'use strict'
const inputs = require('fs').readFileSync(0, 'utf8').split('\n')
inputs.shift()
const tasks = []
for (const input of inputs) {
  const ab = input.split(' ')
  if (ab.length === 2) tasks.push({a: ab[0], b: parseInt(ab[1], 10)})
}
tasks.sort(function(x, y) {return x.b - y.b})
let time = 0
for (const task of tasks) {
  time += parseInt(task.a, 10)
  if (time > task.b) return console.log('No')
}
return console.log('Yes')