def takahashi(A,B):
    if A and B >= 1:
        if A and B <= 9:
            print(A * B)
        else:
            print('-1')
    else:
        print('-1')

A = int(input('数字を入力してくださいA'))
B = int(input('数字を入力してくださいB'))

takahashi(A,B)