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