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 or B >= 10:

    print((-1))

else:

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

-a, b = list(map(int, input().split())) -if 1 <= a <= 9 and 1 <= b <= 9: -    print((a * b)) +A, B = list(map(int, input().split())) +if A >= 10 or B >= 10: +    print((-1)) -    print((-1)) +    print((A * B))