require'prime' puts (gets.to_i.prime_division.flatten-[1]).size>1?:YES: :NO