! 2019.10.27
!
      program answer
      implicit none
      integer :: A
      integer :: B
      integer :: ans
!
      read(*,*) A,B
!
      ans = A * B
      if(A > 9 .or. B > 9) then
        ans = -1
      end if
      write(*,*) ans
      end program answer