
def input_int():
    hoge = input().split()
    A = int(hoge[0])
    B = int(hoge[1])
    return A, B

if __name__ == "__main__":
    A, B = input_int()
    if A <=10 and B <= 10:
        ret = A * B
    else:
        ret = -1
    print(ret)

