require'prime';puts gets.to_i.prime_division.any?{|a|a[1]>1}?:YES:'NO'