A,B = map(int, raw_input().split())
if (A<=9 and A>0):
    if (B<=9 and B>0):
        result = A*B
        print(result)
    else:
        print(-1)
elif (B<=9 and B>0):
    if (A<=9 and A>0):
        result = A*B
        print(result)
    else:
        print(-1)
else: 
    print(-1)
