num = [int(_) for _ in input().split(" ")]

if 0<num[0]<10 and 0<num[1]<10:

  print((num[0]*num[1]))

else:

  print((-1))

"""

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

S = [str(input()) for _ in range(N)]

S = [list(map(int,list(input()))) for _ in range(h)] 

print(*S,sep="")

"""



import sys

sys.setrecursionlimit(10**6)

input = lambda: sys.stdin.readline().rstrip()

inf = float("inf") # 無限



a,b = list(map(int,input().split()))

if 0<a<10 and 0<b<10:

    print((a*b))

else:

    print((-1))
num = [int(_) for _ in input().split(" ")]
if 0 < num[0] < 10 and 0 < num[1] < 10:
    print((num[0] * num[1]))
else:
    print((-1))

"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""
import sys

sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf")  # 無限
a, b = list(map(int, input().split()))
if 0 < a < 10 and 0 < b < 10:
    print((a * b))
else:
    print((-1))

-num = [int(_) for _ in input().split(" ")] -if 0 < num[0] < 10 and 0 < num[1] < 10: -    print((num[0] * num[1])) +""" +N = list(map(int,input().split())) +S = [str(input()) for _ in range(N)] +S = [list(map(int,list(input()))) for _ in range(h)] +print(*S,sep="") +""" +import sys + +sys.setrecursionlimit(10**6) +input = lambda: sys.stdin.readline().rstrip() +inf = float("inf")  # 無限 +a, b = list(map(int, input().split())) +if 0 < a < 10 and 0 < b < 10: +    print((a * b))