import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    A,B=mis()
    print(A*b if 0<A<10 and 0<B<10 else '-1')


if __name__ == "__main__":
    main()