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