#include <bits/stdc++.h>
int main() {
  int n, a, b;
  while (std::cin >> n) {
    if (!n) break;
    int weight = 0, max_weight = 0;
    for (int i = 0; i < n; i++) {
      std::cin >> a >> b;
      if (max_weight < b) max_weight = b;
      weight = weight + a;
    }
    if (weight <= max_weight)
      std::cout << "YES" << std::endl;
    else {
      std::cout << "NO" << std::endl;
    }
  }
  return 0;
}
