fun main(args: Array<String>) {
    var n = readLine()!!.toInt()
    var m = Int.MAX_VALUE
    var mm = 0
    var s = 0L
    val ab = (1..n).map {
        val x = readLine()!!.split(" ").map { it.toInt() }
        if (x[0] > x[1]) {
            println("No")
            return
        }
        m = Math.min(m, x[1])
        mm = Math.max(mm, x[1])
        s += x[0]
        Triple(x[0], x[1], x[1] - x[0])
    }.sortedBy { it.first }.sortedBy { it.third }.sortedBy { it.second }
    if (ab[0].first > m || s > mm) {
        println("No")
        return
    }
    var now = 0
    for (i in ab) {
        now += i.first
        if (now > i.second) {
            println("No")
            return
        }
    }
    println("Yes")
}