{-
切り捨てで10%がb円になるのは、b*10からb*10+9
この中で8%がa円になるものを前から探せば十分。
-}

main = do
  li <- getLine
  let [a,b] = map read $ words li
  let ans = compute a b
  print ans

compute :: Int -> Int -> Int
compute a b
  | null xs = -1
  | True = head xs
  where
    xs = [ x | x <- [b*10..b*10+9], x * 8 `div` 100 == a ]
