Scanf.scanf "%d %d" (
  fun a b ->
  let ar = (a+1) * 100 / 8
  and al = (a * 100 - 1) / 8 + 1
  and br = (b+1) * 10
  and bl = b * 10 in
  let ans =
    if ar - al >= 1 && br - bl >= 1 && max al bl < min ar br then
      max al bl
    else ~-1
  in
  print_int ans
)
