number = list(map(int, input().split()))
#print(number[0])
#print(number[1])

if 1 <= number[0] and number[0] <= 9:
  if 1 <= number[1] and number[1] <= 9:
    print(number[0] * number[1])
else:
  print('-1')