fun main(args : Array<String>) {
    val N = readLine()!!.toInt()
    val AandB = mutableListOf<Pair<Int, Int>>()
    (1..N).forEach {
        val (A, B) = readLine()!!.split(" ").map { it.toInt() }
        AandB.add(Pair(A, B))
    }

    AandB.sortBy {
        it.second
    }

    var currentTime = 0
    AandB.forEach {
        currentTime = currentTime + it.first
        if (currentTime > it.second) {
            println("No")
            return
        }
    }
    println("Yes")
}