#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

struct islands {
  int t;
  int w;

  bool operator>(const islands &left) const {
    return w > left.w;
  }
};

int main() {
  int n, i;
  vector<islands> island;

  while(1) {
    cin >> n;
    if(n == 0)
      break;

    for(i = 0; i < n; i++) {
      islands I;
      cin >> I.t >> I.w;
      island.push_back(I);
    }

    sort(island.begin(), island.end());

    int sum = 0;
    int flag = 0;
    for(i = 0; i < n; i++) {
      sum += island[i].t;
      if(island[i].w < sum) {
        cout << "NO" << endl;
        flag = 1;
        break;
      }
    }
    if(flag != 1)
      cout << "YES" << endl;

    island.clear();
  }
  return 0;
}
