i = list(map(int, input().split()))

if ((i[0] >= 1 and i[0] <= 9) and (i[1] >= 1 and i[1] <= 9)):

    print((i[0] * i[1]))

else:

    print((-1))
i = list(map(int, input().split()))

if ((i[0] <= 9) and (i[1] <= 9)):

    print((i[0] * i[1]))

else:

    print((-1))
i = list(map(int, input().split()))
if (i[0] >= 1 and i[0] <= 9) and (i[1] >= 1 and i[1] <= 9):
    print((i[0] * i[1]))
else:
    print((-1))

i = list(map(int, input().split()))
if (i[0] <= 9) and (i[1] <= 9):
    print((i[0] * i[1]))
else:
    print((-1))

-if (i[0] >= 1 and i[0] <= 9) and (i[1] >= 1 and i[1] <= 9): +if (i[0] <= 9) and (i[1] <= 9):