import Data.List

main = do
  [a, b] <- map read . words <$> getLine :: IO [Int]
  let res = [ x | x <- [0..10000], mul 0.08 x == a, mul 0.1 x == b]
  print $ if res == [] then -1 else minimum res


mul :: Float -> Int -> Int
mul f i =
  floor $ f * (fromIntegral i)