import random

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 = random.randrange(0, 20)
B = random.randrange(0, 20)
result = takahashi.math(A, B)
print(result)