#include <bits/stdc++.h>
using namespace std;
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());
    int x = 0;
    int i;
    for (i = 0; i < n; i++) {
      x += v[i].second;
      if (x > v[i].first) break;
    }
    if (i == n)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
