#!/usr/bin/env python

from sys import stdin, stderr

def main():
   A, B = map(int, stdin.readline().split())
   if 1 <= A <= 9 and 1 <= B <= 9:
      print(A*B)
   else:
      print(-1)

   return 0

if __name__ == '__main__': main()
