a = gets.to_i
num = [9,8,7,6,5,4,3,2]
re = 0
num.each do |n|
    if a%n==0
        a = a / n
        re = n
        puts "#{a}, #{re}"
        break
    end
end

if re < 10 && a < 10
    puts "Yes"
else
    puts "No"
end