/*
  AOJ 1052
  Title:Old Bridges
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
#include <setjmp.h>

jmp_buf jb;
int n,w[25],lim[25], use[25],allw;

int solve2(int cnt,int use[],int acc_weight)
{
  int i;

  //printf("c=%d aw=%d|",cnt,acc_weight); 

  if(cnt==0)
    longjmp(jb,1);

  for(i=0;i<n;i++)
    if(use[i]==0 && acc_weight <= lim[i])
      {
	//printf("br=%d [%d]|",i,acc_weight-w[i]);
	use[i]=1;
	solve2(cnt-1,use,acc_weight-w[i]);
	use[i]=0;
      }      


  return(0);
}

int solve()
{
  if(setjmp( jb ) == 0 ) 
    solve2(n,use,allw);
  else
    {
      return(1);
    }
    
  return(0);
}



main()
{
  int i,ret;
  
  while(scanf("%d",&n)  && n)
    {
     memset(use,0,sizeof(use));
      for(i=allw=0;i<n;i++)
	{
	  scanf("%d %d",&w[i],&lim[i]);
	  allw+=w[i];
	}
      ret=solve(n,use,allw);
      printf("%s\n",ret?"Yes":"No");
    }
  return(0);
}