main = do
   [a,b] <- map read . words <$> getLine
   let l = filter (\x -> ( floor (x*0.08)) == a && (floor (x*0.1)) == b) [1..100]
   if l == []
      then putStrLn "-1"
      else putStrLn $ show $ floor $ head l