Scanf.scanf "%d %d" (fun a b ->
    let rec loop i =
        if i > 1000 then -1 else
        if i * 8 / 100 = a && i / 10 = b then i else
            loop (i + 1)
    in
    loop 1 |> Printf.printf "%d\n"
)