Public Class Program
  Shared Sub Main()
    Dim ab As Integer() = Array.ConvertAll(Of String, Integer)(Console.ReadLine().Split(" "), AddressOf Integer.Parse)
    Dim a As Integer = ab(0)
    Dim b As Integer = ab(1)
    a = If(a > 9, 0, a)
    b = If(b > 9, 0, b)
    Dim ans As Integer = a * b
    Console.WriteLine(If(ans = 0, -1, ans).ToString())
  End Sub
End Class