usrInput = input()
splitedInput = (usrInpuy.split( ))
clearFlag = True

for i in range(2):
  if splitedInput[i] > 9:
    clearFlag[i] = False

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