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



if a > 9 or b > 9:

    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 > 9 or b > 9:
    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 > 9 or b > 9: +if a <= 9 and b <= 9: +    print((a * b)) +else: -else: -    print((a * b))