n = gets.to_i
$l = 0

catch(:break_loop) do
    10.times do |uhen|
        $i = uhen
        10.times do |sahen|
            (puts "Yes" ; throw :break_loop) if $i * sahen == n
        end
        $l = $l + 1
    end
end

puts "No" if $l == 10