
class person():
  def math(self, A, B):
    if A < 10:
      if B < 10:
        result = A*B
      else:
        result = -1
    else:
      result = -1
 
    return result
 
takahashi = person()
A, B = map(int,input().split())
result = takahashi.math(A, B)