def ng
  puts :No
  exit 0
end
N=gets.to_i
S=gets.split.map(&:to_i).sort.reverse
q=[[S.shift,0]]
N.times do |n|
  (2**[n-1,0].max).times do
    x,y=q.shift
    ng unless y<=n
    (N-n).times do
      q<<[S.shift,n]
      ng unless q[-1][0]<x
    end
  end
end
puts :Yes