
data class Task(val size: Int, val deadline: Int)
fun main() {
    val n = readLine()!!.trim().toInt()
    val tasks = List(n){
        val (a, b) = readLine()!!.trim().split(' ').map(String::toInt)
        Task(a, b)
    }.sortedBy(Task::deadline)
    println(tasks.fold(0 as Int?){currentTime, task -> currentTime?.let{task.size + it}?.takeIf{ it <= task.deadline}}?.let{"Yes"} ?: "No")
}