inp = list(map(int,input().split()))
a  = inpp[1]
b = inp[2]
n = a*b
arr []
hello = 0
for i in range(2,10):
  for x in range (2,10):
    arr.append(i*x)
for element in arr:
  if element == n:
    hello = 0
    break
  else:
    hello = 1
if helo == 1:
  print("-1")
else:
  print(n)
