import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS

readInt = fst . fromJust . BS.readInteger
readIntList = map readInt . BS.words
getIntList = readIntList <$> BS.getLine

main = do
    [a, b] <- getIntList
    let minA = fst $ properFraction $ realToFrac a * 12.5
        maxA = fst $ properFraction $ realToFrac (a+1) * 12.5
        minB = b * 10
        maxB = (b+1) * 10 - 1
        minElem = max minA minB
        maxElem = min maxA maxB
        priceSet = [p | p <- [minB.. maxB], fst (properFraction (realToFrac p * 0.08)) == a]
    putStrLn . show $ if length priceSet == 0 then -1 else head priceSet