fun main(args: Array<String>) {

    val N = readLine()!!.split(" ").map { Integer.parseInt(it) }[0]
    val AList = mutableListOf<Int>()
    val BList = mutableListOf<Int>()
    val ABList = mutableListOf<Pair<Int, Int>>()
    for (i in 0 until N) {
        val (A, B) = readLine()!!.split(" ").map { Integer.parseInt(it) }
        AList.add(A)
        BList.add(B)
        ABList.add(Pair(A, B))
    }
    ABList.sortByDescending { pair -> pair.second }

    var current = ABList[0].second
    for (AB in ABList) {
        current = Math.min(AB.second, current)
        current -= AB.first
    }
    if (current < 0) {
        println("No")
    } else {
        println("Yes")
    }

}
