Imports System

Module Program
    Sub Main(args As String())
        Dim tmpA As String() = Split(Console.ReadLine(), " ")
        ' 切り上げにより税込価格を計算
        Dim zei8 As Decimal = 0.08D  ' Dを付けないとDouble型になる
        Dim zeigaku8 As Long = CLng(tmpA(0))
        Dim hontai8A As Long = 0
        Dim hontai8B As Long = 0
        If zeigaku8 Mod zei8 = 0 Then
            hontai8A = zeigaku8 / zei8
        Else
            hontai8A = zeigaku8 / zei8 + 1
        End If

        If zeigaku8 Mod zei8 = 0 Then
            hontai8B = (zeigaku8 + 1) / zei8 - 1
        Else
            hontai8B = (zeigaku8 + 1) / zei8
        End If


        Dim zei10 As Decimal = 0.1D  ' Dを付けないとDouble型になる
        Dim zeigaku10 As Long = CLng(tmpA(1))
        Dim hontai10A As Long = zeigaku10 / zei10
        Dim hontai10B As Long = (zeigaku10 + 1) / zei10 - 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
