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

p a.sort
p count.sort{|(k1, v1), (k2, v2)| k2 <=> k1 }.to_h
sum = 0
can_create = 1
count.sort {|(k1, v1), (k2, v2)| k2 <=> k1 }.each_with_index do |(key, value), i|
  sum += value
  if sum > can_create
    puts 'No'
    exit
  end
  if n > i
    value.times do |v|
      can_create += n-i-v
    end
  end
end

puts 'Yes'
