#include <bits/stdc++.h>
#define int long long
#define P pair<int,int>
#define inf (int)(3e18)
#define mod (int)(1e9+7)
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

int n;
P p[222222];
signed main(){
	cin>>n;
	rep(i,n)cin>>p[i].second>>p[i].first;
	sort(p,p+n);
	int sum=0;
	rep(i,n){
		sum+=p[i].second;
		if(sum>p[i].first){
			cout<<"No"<<endl;return 0;
		}
	}
	cout<<"Yes"<<endl;
}
