Imports System

Module Program
    Sub Main(args As String())
        Dim tmpA As String() = Split(Console.ReadLine(), " ")

        Dim zeigaku8 As Long = CLng(tmpA(0))
        Dim hontai8A As Long = Math.Ceiling(zeigaku8 / 0.08)
        Dim hontai8B As Long = Math.Floor(zeigaku8 / 0.08)



        Dim zeigaku10 As Long = CLng(tmpA(1))
        Dim hontai10A As Long = zeigaku10 / 0.1
        Dim hontai10B As Long = (zeigaku10 + 1) / 0.1 - 1

        Dim i As Long = 0
        For i = hontai10A To hontai10B
            If hontai8A <= i Then
                If i <= hontai8B Then
                    Console.WriteLine(i)
                    Exit Sub
                End If
            End If
        Next

        Console.WriteLine(-1)
    End Sub
End Module
