N = gets.to_i

num = [1, 2, 3, 4, 5, 6, 7, 8, 9]
result = 0

num.each do |i|
  if N % i == 0
    a = N/i
    if a.to_s.chars.length == 1
      result += 1
    end
  end
end

if result > 0
  puts 'Yes'
else
  puts 'No'
end