n = gets.chomp.to_i
p = gets.split.map(&:to_i)

max = p.max
if p.count(max) > 1
  puts "No"
  exit
end

slime = 1
(max-1).downto(1) do |num|
  if p.count(num) > n * slime
    puts "No"
    exit
  end
  slime += 1
end
puts "Yes"

