tax :: Int -> Int -> Int -> Bool
tax a b v = x == a && y == b
    where x = v * 8 `div` 100
          y = v * 10 `div` 100

solve :: Int -> Int -> Int
solve a b =
    let xs = [x | x <- [1..1000], tax a b x]
    in if null xs then -1 else head xs


main :: IO ()
main = do
    [a, b] <- map read . words <$> getLine
    print $ solve a b