#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, sum;
  int a[31], b[31];
  while (cin >> n && n) {
    for (i = 0; i < n; i++) scanf("%d%d", &a[i], &b[i]);
    sum = 0;
    int t = 1;
    for (i = 0; i < n - 1; i++) {
      sum += a[i];
      if (sum >= b[i]) {
        t = 0;
        break;
      }
    }
    if (t) {
      printf("YES\n");
    } else
      printf("NO\n");
  }
}
