A, B = list(map(int, input().split()))



if A >= 10 or B >= 10:

    print((-1))

else:

    print((A*B))

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 or B >= 10:
    print((-1))
else:
    print((A * B))

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 or B >= 10: +a, b = list(map(int, input().split())) +if a <= 9 and b <= 9: +    print((a * b)) +else: -else: -    print((A * B))