#include <bits/stdc++.h>
using namespace std;
int bridges[25];
int treasures[25];
array<bool, 1 << 25> pattern = {};
int n;
bool recur(uint32_t islands, int w) {
  if (pattern[islands]) return false;
  pattern[islands] = true;
  if (islands == 0) return true;
  for (int i = 0; i < n; ++i) {
    if (!(islands & (1 << i))) continue;
    if (w + treasures[i] > bridges[i]) continue;
    if (recur(islands ^ (1 << i), 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);
    cout << (recur((1 << n) - 1, 0) ? "Yes" : "No") << endl;
  }
  return 0;
}
