import java.util.*
import java.math.*

fun main(args: Array<String>) {

//    var (N, K) = readLine()!!.split(" ").map { it.toLong() }
    var N = readLine()!!.toLong()
//    val S = readLine()!!

    val list = mutableListOf<Pair<Long,Long>>()
    for (n in 0 until N) {
        val (A, B) = readLine()!!.split(" ").map { it.toLong() }
        list.add(A to B)
    }
    list.sortBy { it.second }
    var time = 0L
    for ((a,b) in list) {
        time += a
        if (time > b) {
            println("No")
            return
        }
    }
    println("Yes")
}