
class Island
  attr_accessor :weight, :limit

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

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

def get_all?(weight, islands)

  return true if islands.empty?

  islands.size.times.any? do |i|
    island = islands[i]
    
    next_weight = weight + island.weight
    next_islands = islands.dup
    next_islands.delete_at(i)
    
    next false unless next_islands.all? {|i| i.pass? next_weight }

    next true if get_all? next_weight, next_islands
  end
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