
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

class Progress
  attr_accessor :weight, :islands

  def initialize(weight = 0, islands = [])
    @weight = weight
    @islands = islands.dup
  end

  def get_all?
    @islands.empty?
  end

  def delete_at(i)
    @islands.delete_at(i)
  end

  def take(weight)
    @weight += weight
  end

  def dup
    Progress.new(@weight, @islands)
  end
end

def get_all?(weight, islands)

  stack = [Progress.new(0, islands)]


  until stack.empty?
    now = stack.pop

    return true if now.get_all?

    now.islands.size.times do |i|
      next_progress = now.dup
      island = next_progress.delete_at i

      if island.pass? next_progress.weight
        next_progress.take island.weight
        stack << next_progress
      end
    end
  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