Module Module1

    Sub Main()

        Dim tmp As String() = Split(Console.ReadLine())
        Dim A As Integer = CInt(tmp(0))
        Dim B As Integer = CInt(tmp(1))
        Dim ans As Integer = 0

        If 1 <= A AndAlso A <= 9 AndAlso 1 <= B AndAlso B <= 9 Then
            ans = A * B
        Else
            ans = -1
        End If

        Console.WriteLine(ans)
        'Console.Read()

    End Sub

End Module
