n = gets.chomp.to_i
a = Array(1..9)
b = Array(1..9)
ab = []
(0..a.length-1).each do |n|
    (0..b.length-1).each do |m|
        ab << a[n]*b[m]
    end
end
if ab.include?(n)
  puts 'Yes'
else
  puts 'No'
end
