A, B = list(map(int, input().split()))



if 1 <= A <= 9 and 1 <= B <= 9:

  print((A * B))

else:

  print((-1))
A, B = list(map(int, input().split()))



if A < 10 and B < 10:

  print((A * B))

else:

  print((-1))
A, B = list(map(int, input().split()))
if 1 <= A <= 9 and 1 <= B <= 9:
    print((A * B))
else:
    print((-1))

A, B = list(map(int, input().split()))
if A < 10 and B < 10:
    print((A * B))
else:
    print((-1))

-if 1 <= A <= 9 and 1 <= B <= 9: +if A < 10 and B < 10: