program main
  implicit none
  integer :: n, i, j
  logical :: can
  read (*, *) n
  can = .false.
  do i = 1, 9
    do j = 1, 9
      if (i * j == n) can = .true.
    end do
  end do
  if (can) then
    write (*, "(a)") "Yes"
  else
    write (*, "(a)") "No"
  end if
end program main
