input_str = input()

each_str_array = input_str.split()

# input_strが"1 2"の場合、
# each_str_array = ["1", "2"]

first = int(each_str_array[0])
second = int(each_str_array[1])

if(first > 10):
  print("-1")
elif(second > 10):
  print("-1")
else:
  print(str(first * second))
