s = input()

s = s.split(' ')



a, b = int(s[0]), int(s[1])



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

    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))
s = input()
s = s.split(" ")
a, b = int(s[0]), int(s[1])
if 1 <= a <= 9 and 1 <= b <= 9:
    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))

-s = input() -s = s.split(" ") -a, b = int(s[0]), int(s[1]) -if 1 <= a <= 9 and 1 <= b <= 9: -    print(a * b) +A, B = list(map(int, input().split())) +if A <= 9 and B <= 9: +    print((A * B)) -    print(-1) +    print((-1))