#include <bits/stdc++.h>
using namespace std;
int f(vector<pair<int, int> > v) {
  int sum = 0;
  for (int i = 0; i < v.size(); i++) sum += v[i].second;
  if (v[v.size() - 1].first >= sum)
    return 1;
  else
    return 0;
}
int main() {
  int n;
  while (cin >> n, n) {
    vector<pair<int, int> > v;
    for (int i = 0; i < n; i++) {
      int a, b;
      cin >> a >> b;
      v.push_back(pair<int, int>(b, a));
    }
    sort(v.begin(), v.end());
    while (v.size()) {
      if (f(v))
        v.erase(v.end());
      else
        break;
    }
    if (v.size())
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
