# import sys

#

# sys.setrecursionlimit(10 ** 7)

#

# input = sys.stdin.readline

# rstrip()



# int(input())

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



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



if 1 <= a <= 9 and 1 <= b <= 9:

    print((a * b))

else:

    print((-1))

def main():

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

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





if __name__ == '__main__':

    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())
a, b = list(map(int, input().split()))
if 1 <= a <= 9 and 1 <= b <= 9:
    print((a * b))
else:
    print((-1))

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


if __name__ == "__main__":
    main()

-# import sys -# -# sys.setrecursionlimit(10 ** 7) -# -# input = sys.stdin.readline -# rstrip() -# int(input()) -# map(int, input().split()) -a, b = list(map(int, input().split())) -if 1 <= a <= 9 and 1 <= b <= 9: -    print((a * b)) -else: -    print((-1)) +def main(): +    A, B = list(map(int, input().split())) +    print((A * B if 1 <= A <= 9 and 1 <= B <= 9 else -1)) + + +if __name__ == "__main__": +    main()