n = gets.to_i c = 0 n.times do |i| c += 1 if n % (i+1) == 0 if c > 2 break end end puts "YES" if c == 3 puts "NO" if c == 2