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

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



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

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



A, B = lr()

print((-1 if max(A, B) >= 10 else A * B))

A, B = list(map(int, input().split()))
print((A * B if 1 <= A <= 9 and 1 <= B <= 9 else -1))

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
A, B = lr()
print((-1 if max(A, B) >= 10 else A * B))

-A, B = list(map(int, input().split())) -print((A * B if 1 <= A <= 9 and 1 <= B <= 9 else -1)) +import sys + +sr = lambda: sys.stdin.readline().rstrip() +ir = lambda: int(sr()) +lr = lambda: list(map(int, sr().split())) +A, B = lr() +print((-1 if max(A, B) >= 10 else A * B))