      PROGRAM nineByNine
      IMPLICIT NONE
      INTEGER :: A,B
      INTEGER :: ans
      
      READ*,A,B
      
      ans = A*B
      if( A>=10 ) ans = -1
      if( B>=10 ) ans = -1
      
      print*,ans
      
      
      END PROGRAM