program abc144b
   implicit none
   integer :: N, i

   read(*,*) N

   do i = 1, 9
      if (mod(N,i) == 0) then
         if (N/i <= 9) then
            write(*,*) "YES"
            stop
         end if
      end if
   end do

   write(*,*) "NO"

end program abc144b
