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

if A <= 9 and B <= 9: print((A * B))

else: print((-1))
import sys



def solve():

    input = sys.stdin.readline

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

    if A < 10 and B < 10: print((A * B))

    else: print((-1))



    return 0



if __name__ == "__main__":

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

import sys


def solve():
    input = sys.stdin.readline
    A, B = list(map(int, input().split()))
    if A < 10 and B < 10:
        print((A * B))
    else:
        print((-1))
    return 0


if __name__ == "__main__":
    solve()

-A, B = list(map(int, input().split())) -if A <= 9 and B <= 9: -    print((A * B)) -else: -    print((-1)) +import sys + + +def solve(): +    input = sys.stdin.readline +    A, B = list(map(int, input().split())) +    if A < 10 and B < 10: +        print((A * B)) +    else: +        print((-1)) +    return 0 + + +if __name__ == "__main__": +    solve()