
data class Task (
  val cost: Int,
  val deadline: Int
)

fun main(args: Array<String>) {
  val n = readLine()!!.toInt()
  val tasks = (0 until n).map {
    val (a, b) = readLine()!!.split(" ")
    Task(a.toInt(), b.toInt())
  }
  val sortedTasks = tasks.sortedBy { it.deadline }
  var now = 0L
  sortedTasks.forEach {
    now += it.cost
    if (now > it.deadline) {
      println("No")
      return
    }
  }
  println("Yes")
}