#include<bits/stdc++.h>
#define ll long long
const int M=2e5+5;
using namespace std;
struct node{
	ll time;
	ll end;
}a[M];
bool cmp(node x,node y){
	return x.end<y.end;
}
int main(){
	ll n;
	cin>>n;
	for(ll i=0;i<n;i++)
		cin>>a[i].time>>a[i].end;
	sort(a,a+n,cmp);
	ll ans=0,i;
	for(i=0;i<n;i++){
		ans+=a[i].time;
		if(ans>a[i].end) break;
	}
	if(i<n) cout<<"No";
	else cout<<"Yes";
	return 0;
}