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))

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

-if a < 10 and b < 10: +if 1 <= a <= 9 and 1 <= b <= 9: