n = gets.to_i
a = gets.split(' ').map(&:to_i)
count = {}
a.each do |val|
  if count[val].nil?
    count[val] = 1
  else
    count[val] += 1
  end
end
max = count.values.max
puts max <= n ? 'Yes' : 'No'
