#include <algorithm>
#include <iostream>
using namespace std;

typedef struct P {
	int t, m;
	bool operator<(const P &r) {
		return m < r.m ? true : false;
	}
} P;
int n;
P p[32];

int main(){
	int sum;
	bool f;
	while (cin >> n && n != 0) {
		sum = 0;
		f = true;
		for (int i = 0; i < n; i++) {
			cin >> p[i].t >> p[i].m;
		}
		sort(p, p + n);
		for (int i = 0; i < n; i++) {
			sum += p[i].t;
			if (sum > p[i].m) {
				cout << "NO" << endl;
				f = false;
				break;
			}
		}
		if (f) {
			cout << "YES" << endl;
		}
	}

	return 0;
}