#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
double EPS = 1e-10;
int d[30], w[30];
int n;
set<pair<int, int> > st;
bool calc(int past, int sum) {
  if (st.count(make_pair(past, sum))) return true;
  st.insert(make_pair(past, sum));
  if (past == (1 << n) - 1) return true;
  bool ret = false;
  for (int i = 0; i < n; i++) {
    if (past & 1 << i) continue;
    if (sum + d[i] <= w[i]) ret |= calc(past | 1 << i, sum + d[i]);
  }
  return ret;
}
int main() {
  while (cin >> n && n) {
    st.clear();
    for (int i = (0); i < (int)(n); i++) cin >> d[i] >> w[i];
    if (calc(0, 0))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
