loop do
    n = gets.to_i
    break if n == 0
    a = (1..n).map {gets.split.map &:to_i}

    stack = [[0, 0]]
    reached = {0 => 1}
    ok = false
    until stack.empty?
        scanned, weight = stack.pop
        if scanned + 1 == (1 << n)
            ok = true
            break
        end
        (0..n-1).each do |i|
            if scanned[i] == 0 &&
                new_s = scanned | (1 << i)
                next if reached[new_s]
                new_w = weight + a[i][0]
                next if new_w > a[i][1]
                reached[new_s] = 1
                stack << [new_s, new_w]
            end
        end
    end
    puts ok ? 'Yes' : 'No'
end