
class Island
  attr_accessor :weight, :limit

  def initialize(inputs)
    @weight = inputs[0].to_i
    @limit = inputs[1].to_i
  end

  def pass?(weight)
    weight <= @limit
  end
end

def get_all?(weight = 0, islands = [])

  islands = islands.dup
  now_weight = 0

  until islands.empty?
    max_limit_island = islands.max {|a, b| a.limit <=> b.limit }

    if max_limit_island.pass? islands.inject(0) {|sum, v| sum + v.weight }
      now_weight += max_limit_island.weight
      islands.delete max_limit_island
    else
      return false
    end
  end

  true
end

while n = gets.chomp.to_i
  break if n == 0

  islands = n.times.map { Island.new gets.chomp.split(' ') }


  if get_all? 0, islands
    puts 'Yes'
  else
    puts 'No'
  end
end