s = input()

a,b = s.split(' ')

a,b = int(a),int(b)



def mul(a,b):

    if a <= 9 and a >=1 and (1 <= b <= 9):

        return a * b

    else:

        return -1



print(mul(a,b))
a,b = input().split()



a=int(a)

b=int(b)



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

    print((a*b))

else: print("-1")
s = input()
a, b = s.split(" ")
a, b = int(a), int(b)


def mul(a, b):
    if a <= 9 and a >= 1 and (1 <= b <= 9):
        return a * b
    else:
        return -1


print(mul(a, b))

a, b = input().split()
a = int(a)
b = int(b)
if a >= 1 and a <= 9 and b >= 1 and b <= 9:
    print((a * b))
else:
    print("-1")

-s = input() -a, b = s.split(" ") -a, b = int(a), int(b) - - -def mul(a, b): -    if a <= 9 and a >= 1 and (1 <= b <= 9): -        return a * b -    else: -        return -1 - - -print(mul(a, b)) +a, b = input().split() +a = int(a) +b = int(b) +if a >= 1 and a <= 9 and b >= 1 and b <= 9: +    print((a * b)) +else: +    print("-1")