n = gets.to_i
s = gets.split.map { |s| s.to_i }
s.sort!
t = [s.pop]
while s.length > 0
  t1 = []
  t.each { |i|
    jj = s.bsearch_index { |j| j >= i }
    if jj == nil
      t1 << s.pop
    elsif jj > 0
      t1 << s[jj - 1]
      s.delete_at(jj - 1)
    else
      puts 'No'
      exit
    end
  }
  t += t1
end
puts 'Yes'
