#include <bits/stdc++.h>
using namespace std;
int dfs(int);
int sum, total, v[26], n, a[26], b[26];
int main(void) {
  int ans;
  while (1) {
    ans = 0;
    total = 0;
    fill(a, a + 26, 0);
    fill(b, b + 26, 0);
    cin >> n;
    if (n == 0) break;
    for (int i = 0; i < n; i++) {
      cin >> a[i] >> b[i];
      total += a[i];
    }
    for (int i = 0; i < n; i++) {
      fill(v, v + 26, 0);
      sum = 0;
      ans += dfs(i);
    }
    printf((ans > 0) ? "Yes\n" : "No\n");
  }
  return 0;
}
int dfs(int i) {
  v[i] = 1;
  sum += a[i];
  if (sum == total && sum <= b[i]) return 1;
  for (int j = 0; j < n; j++)
    if (sum <= b[i] && v[j] == 0) return dfs(j);
  sum -= a[i];
  v[i] = 0;
  return 0;
}
