usrInput = input()
splitedInput = usrInput.split()
clearFlag = []

for i in range(2):
    if int(splitedInput[i]) >= 10:
        splitedInput.append(False)
    else:
        splitedInput.append(True)

if bool(splitedInput[0]) == True & bool(splitedInput[1]) == True:
    print(int(splitedInput[0]) * int(splitedInput[1]))
else:
    print(-1)