#include <bits/stdc++.h>
using namespace std;
int bridges[25];
int treasures[25];
array<bool, 1 << 25> pattern = {};
int n;
bool recur(bitset<25> islands, int w) {
  if (pattern[islands.to_ulong()]) return false;
  pattern[islands.to_ulong()] = true;
  if (islands.none()) return true;
  for (int i = 0; i < n; ++i) {
    if (!islands.test(i)) continue;
    if (w + treasures[i] > bridges[i]) continue;
    auto new_islands = islands;
    new_islands.reset(i);
    if (recur(new_islands, w + treasures[i])) return true;
  }
  return false;
}
int main() {
  while (true) {
    cin >> n;
    if (n == 0) break;
    for (int i = 0; i < n; ++i) cin >> treasures[i] >> bridges[i];
    pattern.fill(false);
    bitset<25> islands((1 << n) - 1);
    cout << (recur(islands, 0) ? "Yes" : "No") << endl;
  }
  return 0;
}
