#include <iostream>
#include <vector>
#define rep(i, a, n) for(int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main()
{
    int n;
    cin >> n;
    vector<pair<int, int>> a(n);
    rep(i, 0, n){
        cin >> a[i].second >> a[i].first;
    }
    sort(a.begin(), a.end());
    ll heap = 0;
    rep(i, 0, n){
        heap += a[i].second;
        if(heap > a[i].first){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}
