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