#include <bits/stdc++.h>
using namespace std;
struct island {
  int v, t;
};
struct island a[1000];
bool cmp(struct island a, struct island b) { return a.t < b.t; }
int main() {
  int n;
  while (cin >> n && n != 0) {
    for (int i = 1; i <= n; i++) cin >> a[i].v >> a[i].t;
    sort(a + 1, a + n + 1, cmp);
    int f = 1;
    long long sum = 0;
    for (int i = 1; i <= n; i++) {
      sum += a[i].v;
      if (sum > a[i].t) f = 0;
    }
    if (f == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
