/**
 *Code Author: codeknight13
 *Institution: IIT(ISM)
**/

#include <bits/stdc++.h>
using namespace std;

/*
use these format of input when number of inputs not provided
while(scanf("%lld",&n)!=EOF)
*/

#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define ll long long int
#define vi vector< ll >
#define vii vector< vi >
#define viii vector< vii >
#define pii pair< int , int >
#define vpii vector< pii >
#define mii unordered_map< int , int >
#define mci map< char , int >
#define pq priority_queue
#define str string
#define len length()
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define nl cout <<  endl
#define sp " "
#define all(ar) ar.begin(), ar.end()
#define rall(ar) ar.rbegin(), ar.rend()
#define itern(n) for (int i=0; i<n; i++)
#define iterni(n) for (int i=0; i<n; i++)
#define iternj(n) for (int j=0; j<n; j++)
#define iternk(n) for (int k=0; k<n; k++)
#define iterng(n) for (int g=0; g<n; g++)
#define riterni(n) for (int i=n-1; i>=0; i--)
#define riternj(n) for (int j=n-1; j>=0; j--)
#define riternk(n) for (int k=n-1; k>=0; k--)
#define riterng(n) for (int g=n-1; g>=0; g--)
#define sz(x) ((int)(x).size())
#define pi acos(1);                   /* pi */
#define inf (int)(1e9+7)
#define fl(x) int(x)
#define mod 998244353 
#define yes "Yes"
#define no "No"
#define null NULL
#define mac (int)(1e7)
//debugger
#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;
/*-----functions-----*/
//gcd
/*
int gcd(int a, int b) {return b == 0 ? a : gcd(b, a % b);}

//disjoint set union functions
int volume[4];
int parent[4];

void initialise_dsu() {
	for (int i=0; i<mac; i++)volume[i]=1;
	for (int i=0; i<mac; i++)parent[i]=i;
}

int find_set(int v) {
    return (v==parent[v]?v:parent[v]=find_set(parent[v]));
}

void union_sets(int a,int b) {
	a=find_set(a);
	b=find_set(b);
	if (a!=b) {
		if (volume[a]<volume[b])swap(a,b);
		parent[b]=a;
		volume[a]+=volume[b];
	}
}
//#------------------------------complete template------------------------------#//
*/
bool cust(pii a, pii b) {
	if (a.ss<b.ss) {
		return true;
	} else if (a.ss>b.ss) {
		return false;
	} else {
		return a.ff<b.ff;
	}
	return true;
}

int main() {
	fast;
	int n;
	cin >> n;
	vpii x(n);
	itern(n) {
		int a,b;
		cin >> a >> b;
		x[i]={a,b};
	}
	sort(all(x),cust);
	ll time=0;
	for (int i=0; i<n; i++) {
		time+=x[i].ff;
		if (time>x[i].ss) {
			cout << "No";
			return 0;
		}
	}
	cout << "Yes";
	return 0;
}

Measured memory_bytes: 1792