#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  vector<pair<int, int> > island;
  int n;
  while (true) {
    cin >> n;
    if (n == 0) break;
    int a, b, *tmp;
    for (int i = 0; i < n; i++) {
      cin >> a >> b;
      island.push_back(pair<int, int>(b, a));
    }
    sort(island.begin(), island.end());
    int sum = 0;
    bool could = true;
    for (int i = 0; i < n; i++) {
      sum += island[i].second;
      if (sum >= island[i].first) {
        could = false;
        cout << "NO" << endl;
      }
    }
    if (could) cout << "YES" << endl;
    island.clear();
  }
  return 0;
}
