let n = Int(readLine()!)!

var tasks: [(cost: Int, deadline: Int)] = .init(repeating: (-1, -1), count: n)

for i in 0..<n {
  let inp = readLine()!.split(separator: " ").map { Int($0)! }
  tasks[i] = (inp[0], inp[1])
}

tasks = tasks.sorted { $0.deadline < $1.deadline }

var current = 0
var ans = true
for t in tasks {
  current += t.cost
  if current > t.deadline {
    ans = false
    break
  }
}
print(ans ? "Yes" : "No")