fun main(args:Array<String>?): Unit {
    while(true) {
        val n = readLine()!!.trim().toInt()
        if (n == 0) return
        val islands = Array(n){
            val (w, b) = readLine()!!.trim().split(' ').map(String::toLong)
            Pair(w, b)
        }.sortedByDescending(Pair<*, Long>::second)
        val sum = islands.map(Pair<Long, *>::first).sum()
        println(
                if (islands.fold(sum){weights, (w, b) ->
                            if (b >= weights) weights - w
                            else weights } == 0L) "Yes" else "No"
        )
    }
}
