n = gets.to_i
s = gets.chomp.split(" ").map(&:to_i)
s.sort!.reverse!
d = []
d << s.shift
able = true
until s.empty?
  n -= 1
  if n < 0
    able = false
    break
  end
  d_s = []
  d.each do |e|
    multiplied = false
    s.each_with_index do |unit,idx|
      if unit < e
        d_s << s.delete_at(idx)
        multiplied = true
        break
      end
    end
    unless multiplied
      able = false
      break
    end
  end
  break unless able
  d = d + d_s
end
if able
  print("Yes")
else
  print("No")
end