object Main extends App {

  case class Task(cost: Int, deadline: Int)


  def readInput: List[Task] = {
    val N = io.StdIn.readLine().toInt
    var list = scala.collection.mutable.ListBuffer.empty[Task]
    (1 to N).foreach { _ =>
      val i = io.StdIn.readLine().split(" ").map(_.toInt)
      val A = i(0)
      val B = i(1)
      list += Task(A, B)
    }
    list.toList
  }

  val tasks = readInput
  val orderedTasks = tasks.sortWith { (a, b) => a.deadline <= b.deadline }

  // 締め切りの近いタスクから消化
  var currentTime = 0
  var isSuccess = true
  orderedTasks.foreach { t =>
    currentTime += t.cost
    if (t.deadline < currentTime) isSuccess = false
  }

  if (isSuccess) println("Yes") else println("No")

}
