#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 25;
int n;
int v, l;
pair<int, int> p[MAX_N];
void solve() {
  int accum = 0;
  sort(p, p + n);
  for (int i = 0; i < (n); i++) {
    accum += p[i].first;
    if (accum <= p[i].second) {
      continue;
    } else {
      cout << "NO" << endl;
      return;
    }
  }
  cout << "YES" << endl;
  return;
}
int main() {
  while (1) {
    cin >> n;
    if (n == 0) break;
    for (int i = 0; i < (n); i++) {
      cin >> v >> l;
      p[i] = pair<int, int>(v, l);
    }
    solve();
  }
}
