import sys

input = sys.stdin.readline

sys.setrecursionlimit(100000)

def getN():

    return int(eval(input()))

def getList():

    return list(map(int, input().split()))



def solve():



    return



def main():

    a, b = getList()

    if a <= 9 and b <= 9:

        print((a*b))

    else:

        print((-1))







if __name__ =="__main__":

    main()
def getList():

    return list(map(int, input().split()))

a, b = getList()

if a > 9 or b > 9:

  print((-1))

else:

  print((a*b))
import sys

input = sys.stdin.readline
sys.setrecursionlimit(100000)


def getN():
    return int(eval(input()))


def getList():
    return list(map(int, input().split()))


def solve():
    return


def main():
    a, b = getList()
    if a <= 9 and b <= 9:
        print((a * b))
    else:
        print((-1))


if __name__ == "__main__":
    main()

def getList():
    return list(map(int, input().split()))


a, b = getList()
if a > 9 or b > 9:
    print((-1))
else:
    print((a * b))

-import sys - -input = sys.stdin.readline -sys.setrecursionlimit(100000) - - -def getN(): -    return int(eval(input())) - - -def solve(): -    return - - -def main(): -    a, b = getList() -    if a <= 9 and b <= 9: -        print((a * b)) -    else: -        print((-1)) - - -if __name__ == "__main__": -    main() +a, b = getList() +if a > 9 or b > 9: +    print((-1)) +else: +    print((a * b))