#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  while (true) {
    cin >> n;
    if (!n) return 0;
    pair<int, int> data[25];
    for (int i = 0; i < n; i++) {
      cin >> data[i].second >> data[i].first;
    }
    sort(data, data + n);
    int b = 0;
    for (int i = 0; i < n; i++) {
      if (data[i].first - data[i].second >= b)
        b += data[i].second;
      else
        b = -1;
      if (b < 0) break;
    }
    if (b == -1)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
