fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val tasks= (0 until n).map {
        val (a, b) = readLine()!!.split(' ').map { it.toLong() }
        return@map Pair(a, b)
    }.sortedBy { it.second }

    var t = 0L

    for (task in tasks) {
        t += task.first
        if (t > task.second) {
            println("No")
            return
        }
    }

    println("Yes")
}