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