from typing import List


class Solution:
    def solve(self, a: int, b: int) -> int:

        if 1 <= a <= 9 and 1 <= b <= 9:
            return a*b
        else:
            return -1


if __name__ == '__main__':

    # standard input
    a, b = map(int, input().split())

    # solve
    solution = Solution()
    print(solution.solve(a, b))
