fun main(args:Array<String>){
    val n = readLine()!!.toInt()
    val map = mutableMapOf<Int,Int>()
    for(i in 1..n){
        val line = readLine()!!.split(" ").map{it.toInt()}
        val a = line[0]
        val b = line[1]
        if(map.contains(b)){
            val x = a + map.get(b)!!
            map.put(b,x)
        }else{
            map.put(b,a)
        }
    }
    var sum = 0
    for(i in map.keys.sorted()){
        if(map.contains(i)){
            sum+=map.get(i)!!
            if(sum>i){
                println("No")
                return
            }
        }
    }
    println("Yes")
}