object Main{
    def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt()
    val array = new Array[(Long, Long)](n)
    for (i <- 0 until n) {
      val a = sc.nextLong()
      val b = sc.nextInt()
      array(i) = (a, b)
    }

    val sorted = array.sortBy(_._2)

    var time : Long = 0

    for(i <- 0 until n){
        time += sorted(i)._1
        if(time > sorted(i)._2){
            println("No")
            sys.exit()
            }
        }
    println("Yes")
    }
}
// why is this CE ?