a, b = list(map(int, input().split()))



print((a*b if len(str(a)) == len(str(b)) == 1 else -1))

a, b = list(map(int, input().split()))

print((a*b if a <= 9 and b <= 9 else -1))

a, b = list(map(int, input().split()))
print((a * b if len(str(a)) == len(str(b)) == 1 else -1))

a, b = list(map(int, input().split()))
print((a * b if a <= 9 and b <= 9 else -1))

-print((a * b if len(str(a)) == len(str(b)) == 1 else -1)) +print((a * b if a <= 9 and b <= 9 else -1))