N = gets.to_i
Ss = gets.split.map(&:to_i)
INF = 10**9 + 5
M = 1 << N

ss = Ss.sort.reverse
pp = [ss[0]]
ss[0] = INF
N.times do
  pp.sort!
  i = 1
  np = pp.dup
  while !pp.empty?
    p = pp.pop
    loop do
      if ss[i] < p
        np << ss[i]
        ss[i] = INF
        break
      else
        i += 1
      end
      if i == M
        puts 'No'
        exit
      end
    end
  end
  pp = np
end
puts 'Yes'