
object Main extends App {
  import scala.io.StdIn._
  val n = readInt()
  val tasks = Array.fill(n){
    readLine.trim.split(' ').map(_.toInt) match {
      case Array(a, b) => Task(a, b)
    }
  }
  println(
    if (tasks.sortBy(_.limit).foldLeft(Some(0): Option[Int]){(o, t) => o.map(_ + t.time).filter(_ <= t.limit)}.isDefined) "Yes" else "No"
  )
  case class Task(time: Int, limit: Int)
}
