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))

-if A >= 10 or B >= 10: +if A <= 9 and B <= 9: +    print((A * B)) +else: -else: -    print((A * B))