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 a <= 9 and 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 a <= 9 and b <= 9:
    print((a * b))
else:
    print((-1))

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