import Data.List

main::IO()
main = do
    s <- words <$> getLine
    let [a,b] = map read s :: [Int]
    let x = map floor [x | x<-[1..], (floor (x*0.08))==a]
    let y = map floor [y | y<-[1..], (floor (y*0.1 ))==b]
    print $ if (intersect x y) == [] then -1 else minimum $intersect x y