#include <bits/stdc++.h>
int main() {
  int n, i, s;
  std::pair<int, int> b[25];
  while (scanf("%d", &n), n) {
    for (i = 0; i < n; ++i) scanf("%d%d", &b[i].second, &b[i].first);
    std::sort(b, b + n);
    for (i = s = 0; i < n; ++i) {
      s += b[i].second;
      if (s > b[i].first) {
        puts("NO");
        goto E;
      }
    }
    puts("YES");
  E:;
  }
  return 0;
}
