fun main(args: Array<String>) {
    abc131d()
}

private data class Task(val takeTime: Long, val deadLine: Long)

fun abc131d() {
    val n = readLine()!!.toInt()
    val taskList = (1..n).map { readLine()!!.split(' ').map { it.toLong() } }
        .map { Task(it[0], it[1]) }
        .sortedBy { it.deadLine }

    taskList.fold(0L) { acc, task ->
        if (acc + task.takeTime <= task.deadLine) acc + task.takeTime else return println("No")
    }

    println("Yes")
}
