#include<stdio.h>
#include<string.h>

#define SIZE 100

int main(void){
	int total = 0;
	int max = 0;
	int tmp[2];
	
	char buf[SIZE];
	int line = 1;
	char *tp;//token pointer
	
	while(fgets(buf, SIZE, stdin) != NULL){
		if(line == 1){
			line++;
			continue;
		}
		
		//printf("fgets:%s", buf);//check
		
		if(strstr(buf, " ") == NULL){// && line != 1){
			if(total <= max){
				printf("Yes\n");
			}else{
				printf("No\n");
			}
			total = 0;
			max = 0;
		}else{
			buf[strlen(buf)-1] = '\0';//chomp
			
			tp = strtok(buf, " ");
			tmp[0] = atoi(tp);
			tp = strtok(NULL, " ");
			tmp[1] = atoi(tp);
			//scanf("%d %d", &tmp[0], &tmp[1]);
			
			//printf("bridge:%d %d\n", tmp[0], tmp[1]);//check
			
			total += tmp[0];
			if(max < tmp[1]){
				max = tmp[1];
			}
		}
		
		line++;
	}
}