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

if 1<=a and a <= 9 and 1 <= b and b <= 9:

  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 1 <= a and a <= 9 and 1 <= b and b <= 9:
    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 1 <= a and a <= 9 and 1 <= b and b <= 9: +if 1 <= a <= 9 and 1 <= b <= 9: