require'prime' s=0 gets.to_i.prime_division.map{|a|s+=a[1]} puts s>2?:YES:'NO'