#include<iostream>
using namespace std;
int c1,c2,n,w[10];
int weight=0,max_num=0;
void search(int m){
if(m==n){
if(weight<=c1 &&weight >= max_num){
max_num=weight;
}
}else{
if(weight+w[m]<=c1){
weight += w[m];
search(m+1);
weight -= w[m];
}
search(m+1);
}
}
int main(){
int i,sum=0,t;
cin>>t;
while(t--){
cin>>c1>>c2>>n;
max_num=0;
sum=0;
for(i=0;i<n;i++){
scanf("%d",&w[i]);
sum += w[i];
}
search(0);
if(sum-max_num<=c2){
printf("Yes\n");
}
else{
printf("No\n");
}
}
return 0;
}