input = gets.chomp.to_i
 
res = false
(2..9).each do |i|
  if input % i == 0 && input / i <= 9
      res = true 
      break
  end
end
 
if (1..9).include?(input) || res 
  puts 'Yes'
else
  puts 'No'
end