import Data.List

main = do
   [a, b] <- (map read).words <$> getLine
   let price = find (\n -> (n * 8 `div` 100) == a && (n * 1 `div` 10) == b ) [1..1000]
   if price == Nothing then print (-1)
   else let Just p = price in print p