Module Module1

    Sub Main()
        Dim ans As String = ""

        Dim input() As String = Console.ReadLine.Split(" "c)

        Dim value(input.Length - 1) As Integer

        For i As Integer = 0 To input.Length - 1
            value(i) = CInt(input(i))
        Next

        Dim eightpermin As Integer = CInt(System.Math.Ceiling(value(0) / 0.08))
        Dim eightpermax As Integer = CInt(System.Math.Floor((value(0) + 1) / 0.08))
        Dim tenpermin As Integer = CInt(System.Math.Ceiling(value(1) / 0.1))
        Dim tenpermax As Integer = CInt(System.Math.Floor((value(1) + 1) / 0.1))

        If (tenpermin < eightpermin AndAlso tenpermax < eightpermin) OrElse (tenpermin > eightpermax AndAlso tenpermax > eightpermax) Then
            ans = "-1"
        Else

            If eightpermin <= tenpermin Then
                ans = tenpermin.ToString
            Else
                ans = eightpermin.ToString
            End If

        End If



            Console.WriteLine(ans)
        Console.ReadKey()




    End Sub




End Module