#include <bits/stdc++.h>
int n, w[25], lim[25], use[25];
int solve(int cnt, int use[], int acc_weight) {
  int i, ret;
  if (cnt == 0) return (1);
  ret = 0;
  for (i = 0; i < n; i++)
    if (use[i] == 0 && acc_weight + w[i] <= lim[i]) {
      use[i] = 1;
      ret |= solve(cnt - 1, use, acc_weight + w[i]);
      use[i] = 0;
    }
  return (ret);
}
int main() {
  int i, ret;
  while (scanf("%d", &n) && n) {
    for (i = 0; i < n; i++) scanf("%d %d", &w[i], &lim[i]);
    ret = solve(n, use, 0);
    printf("%s\n", ret ? "Yes" : "No");
  }
  return (0);
}
