#include <bits/stdc++.h>
int main(void) {
  int a, b, c, d, i, n;
  scanf("%d", &n);
  while (n != 0) {
    c = 0;
    d = 0;
    for (i = 1; i <= n; i++) {
      scanf("%d %d", &a, &b);
      c = c + a;
      if (d < b) {
        d = b;
      }
    }
    if (c <= d) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
    scanf("%d", &n);
  }
  return 0;
}
