fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val ab = (1..n).map{
        val (a, b) = readLine()!!.split(' ').map(String::toInt)
        Pair(a, b)
    }.sortedBy { it.second }
    var po = 0
    var ans = "Yes"
    for(i in 0 until n) {
        po += ab[i].first
        if (po > ab[i].second) {
            ans = "No"
            break
        }
    }
    println(ans)
}
