fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val task = (1..n).map { readLine()!!.split(" ").map { it.toInt() } }.sortedBy { it[1] }

    val time = task.map { it[0] }.summed()
    val deadLine = task.map { it[1] }

    if(task.indices.all { time[it] <= deadLine[it] })
        println("Yes")
    else
        println("No")
}

fun List<Int>.summed(): List<Long> { var sum = 0L; return this.map { sum += it; sum } }
