#include <bits/stdc++.h>
using namespace std;
int cmp(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int main() {
  int n, a, b, now;
  while (cin >> n && n) {
    bool flag = false;
    vector<pair<int, int> > p;
    for (int i = 0; i < n; i++) {
      cin >> a >> b;
      p.push_back(make_pair(a, b));
    }
    sort(p.begin(), p.end(), cmp);
    now = 0;
    for (int i = 0; i < n; i++) {
      now += p[i].second;
      if (now > p[i].first) flag = true;
    }
    if (flag)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
