#include <bits/stdc++.h>
int main() {
  for (int n, i, a; scanf("%d", &n), n; puts(!a ? "Yes" : "No")) {
    std::map<int, int> m;
    for (i = n; i--; m.insert(std::pair<int, int>(a, n))) scanf("%d%d", &n, &a);
    n = a = 0;
    for (std::map<int, int>::iterator i = m.begin();
         n += i->second, i != m.end(); ++i)
      i->first < n ? a = 1 : 0;
  }
}
