A, B = [int(i) for i in input().split()]



if A < 10 and B < 10:

  print((A * B))

else:

  print((-1))
A, B = [int(i) for i in input().split()]



if A <= 9 and B <= 9:

    print((A*B))

else:

    print((-1))
A, B = [int(i) for i in input().split()]
if A < 10 and B < 10:
    print((A * B))
else:
    print((-1))

A, B = [int(i) for i in input().split()]
if A <= 9 and B <= 9:
    print((A * B))
else:
    print((-1))

-if A < 10 and B < 10: +if A <= 9 and B <= 9: