n = gets.to_i
p = gets.chomp.split().map(&:to_i)
if p.length == 2**n
   slime = 0
else
   slime = -1
end
p = p.sort.reverse.chunk(&:itself)

list = []
p.each{|key, value|
  list.push(value)
}

if list[0].count >= 2
   puts "No"
   exit()
end

sec = 0
for i in 0..list.length-2
    slime += list[i].count * (n-sec)
    slime -= list[i+1].count
    if slime < 0
       slime = -1
       break
    end
    sec	+= 1
end


if slime == 0
   puts "Yes"
else
   puts "No"
end