open Printf
open Scanf

let id x = x

let rec seq s t f =
  if s > t then []
  else
    let x = f s in
    x :: seq (s + 1) t f

let solve a b =
  let f x = x * 8 / 100 = a && x / 10 = b in
  try
    List.find f @@ seq 1 1009 id
  with
    Not_found -> -1

let () =
  scanf "%d %d " solve |> printf "%d\n"
