require "prime"

N = gets.chomp.to_i

if N > 81
  puts "No"
  exit
end

factors = N.prime_division

if factors.size == 1
  n, m = factors[0]

  if (1..9).include?(n) && [2, 4].include?(m)
    puts "Yes"
    exit
  end
else
  if factors.all? { |n, m| (1..9).include?(n) && m == 1 }
    puts "Yes"
    exit
  end
end

puts "No"
