#include <bits/stdc++.h>
using namespace std;
bool myComparison(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second < b.second;
}
int main() {
  int n = 0;
  vector<int> re;
  while (cin >> n, n != 0) {
    vector<pair<int, int> > v;
    for (int i = 0; i < n; i++) {
      int t1, t2;
      cin >> t1 >> t2;
      v.push_back(make_pair(t1, t2));
    }
    sort(v.begin(), v.end(), myComparison);
    int flag = 0;
    int load = 0;
    for (int i = 0; i < v.size(); i++) {
      load += v[i].first;
      if (load > v[i].second) {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      re.push_back(1);
    } else {
      re.push_back(0);
    }
  }
  for (int i = 0; i < re.size(); i++) {
    if (re[i] == 1) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
