#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    
   	if A > 9 or B > 9:
      print(-1)
    else:
      print(A * B)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(N, L)

if __name__ == '__main__':
    main()
