#include <bits/stdc++.h>
using namespace std;
bool myComparison(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second < b.second;
}
int main() {
  int n = 0;
  cin >> n;
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int t1, t2;
    cin >> t1 >> t2;
    v.push_back(make_pair(t1, t2));
  }
  sort(v.begin(), v.end(), myComparison);
  int flag = 0;
  int load = 0;
  for (int i = 0; i < v.size(); i++) {
    load += v[i].first;
    if (load > v[i].second) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
