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

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

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