fun main(args: Array<String>) {
    val n = Integer.parseInt(readInputLine())
    
    val workList = mutableListOf<Pair<Long, Long>>()
    
    for (i in 0 until n) {
        val inputs = readInputLine().split(" ").map { it.toLong() }
        workList.add(Pair(inputs[0], inputs[1]))
    }
    
    workList.sortBy { it.second }

    var nowTime = 0L

    for (elem in workList) {
        nowTime += elem.first
        if (nowTime > elem.second) {
            println("No")
            return
        }
    }

    println("Yes")
}
 
fun readInputLine(): String {
    return readLine()!!
}
