let () =
  let a, b = Scanf.scanf "%f %f\n" @@ fun a b -> a, b in
  let ans = ref 0 in
  for y = 1 to int_of_float (a *. 100. /. 8.) do
    if y * 8 / 100 = int_of_float(floor(a)) && y * 10 / 100 = int_of_float(floor(b))
    then ans := y
  done;
  Printf.printf "%d\n" (if !ans = 0 then -1 else !ans)