n = gets.to_i
t = gets.chomp.split.map &:to_i

h = Hash.new(0)
t.each do |d|
  h[d] += 1
end
t = t.uniq.sort{|a,b|b<=>a}
f = true
if(h[t[0]] != 1)
  f = false
end
t.delete_at(0)

tree  = Array.new(n, 0)
max   = Array.new(n, 0)
n.times{|i|max[i] = 2**i}

t.each do |d|
  able  = 1
  stock = h[d]
  n.times do |i|
    plable = tree[i]
    if(tree[i]<max[i])
      note    = [[max[i]-tree[i], able-tree[i], stock].min, 0].max
      tree[i] += note
      stock   -= note
    end
    able  += plable
  end
  f = false if(stock != 0)
end

puts (f)? "Yes" : "No"
