include Math
N = gets.to_i
remain = N
S = gets.split.map(&:to_i)
count = Hash.new(0)
S.each do |s|
    count[s] += 1
end
initial = nil
sorted = count.sort_by{|k, v| k}.reverse
if sorted.length == 1
    puts "No"
    exit
end
for i in 0..sorted.length-2
    hpi, numi = sorted[i]
    hpi1, numi1 = sorted[i+1]
    if hpi - hpi1 < log(numi1.to_f / numi, 2)
        puts "No"
        exit
    else
        remain = remain - log(numi1.to_f / numi, 2)
        p remain
        if remain < 0
            puts "No"
            exit
        end
    end
end
puts "Yes"