n=gets.to_i+1 puts `sort|uniq -c|sort -n`.to_i>n/2?:NO: :YES