#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const double EPS = 1e-10;
const double PI = 3.14159;
pair<int, int> bridge[50];
int main() {
  int n;
  while (cin >> n && n) {
    for (int i = 0; i < n; i++) {
      cin >> bridge[i].second >> bridge[i].first;
    }
    sort(bridge, bridge + n);
    int sum = 0;
    int p = 0;
    while (p < n && sum + bridge[p].second <= bridge[p].first) {
      sum += bridge[p].second;
      p++;
    }
    if (p == n)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
