def main():

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



    if len(a) == 1 and len(b) == 1:

        print((int(a) * int(b)))

    else:

        print("-1")





if __name__ == "__main__":

    main()

def main():

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

    print((a * b if a < 10 and b < 10 else "-1"))





if __name__ == "__main__":

    main()

def main():
    a, b = list(map(str, input().split()))
    if len(a) == 1 and len(b) == 1:
        print((int(a) * int(b)))
    else:
        print("-1")


if __name__ == "__main__":
    main()

def main():
    a, b = list(map(int, input().split()))
    print((a * b if a < 10 and b < 10 else "-1"))


if __name__ == "__main__":
    main()

-    a, b = list(map(str, input().split())) -    if len(a) == 1 and len(b) == 1: -        print((int(a) * int(b))) -    else: -        print("-1") +    a, b = list(map(int, input().split())) +    print((a * b if a < 10 and b < 10 else "-1"))