import collections
import numpy as np

# = input()
# = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
#

A, B = map(int, input().split())

if 1 <= A <= 9 and 1 <= B <= 9:
  print(A * B)
  else:
    print(-1)