open System

let a, b = stdin.ReadLine().Split() |>fun list -> (list.[0], list.[1])

[ 
    (float a * 100.0 / 8.0 |> Math.Floor |> int)
        ..
        (float a * 100.0 / 7.0 |> Math.Floor |> int) 
]
|> Set.ofList
|> Set.intersect (
    [ 
        (float b * 100.0 / 10.0 |> Math.Floor |> int)
            ..
            (float b * 100.0 / 9.0 |> Math.Floor |> int) 
    ]
    |> Set.ofSeq
)
|> function
| set when set.IsEmpty -> -1
| set -> set |> Set.minElement
|> stdout.WriteLine