#include <bits/stdc++.h>
using namespace std;
int main() {
  for (int N; cin >> N, N;) {
    vector<pair<int, int> > v;
    for (int i = 0; i < N; i++) {
      int a, b;
      cin >> a >> b;
      v.push_back(make_pair(b, a));
    }
    sort(v.begin(), v.end());
    vector<int> w1, w2;
    for (int i = 0; i < N; i++) {
      w1.push_back(v[i].first);
      w2.push_back(v[i].second);
    }
    partial_sum(w2.begin(), w2.end(), w2.begin());
    bool f = true;
    for (int i = 0; i < N; i++)
      if (w1[i] < w2[i]) f = false;
    cout << (f ? "YES" : "NO") << endl;
  }
}
