
a, b = map(int, input().split())
if 1 > a or a > 20:
    raise ValueError("invalid number")
    
if 1 > b or b > 20:
    raise ValueError("invalid number")

if a <= 0 or a >= 10:
     print("-1")
if b <= 0 or b >= 10:
    print("-1")
print("{}".format(a*b))