#include <bits/stdc++.h>
using namespace std;
unordered_map<long long,int>m1;
long long pre[100008],ar[100008];
void func(int l,int r)
{//cout<<l<<" l_r "<<r<<endl;
	if(l<=r)
{if(l!=0)
	m1[pre[r]-pre[l-1]]++;
	else
	m1[pre[r]]++;
	int mid=(ar[l]+ar[r])/2;
int low=l,high=r,index=r+1;
while(low<=high)
{//cout<<low<<" l_h "<<high<<endl;
	int m1=(low+high)/2;
if(ar[m1]>mid)
{high=m1-1;
index=m1;
}
else
low=m1+1;
}
//cout<<"ar"<<endl;
/*for(int i=l;i<=r;i++)
cout<<ar[i]<<" ";
cout<<endl;
cout<<index<<" index_mid "<<mid<<endl;
*/if((index-1)==r)
return;
func(l,index-1);
func(index,r);
}
}
int main() {
int t;
cin>>t;
while(t--)
{int n,q;
cin>>n>>q;
m1.clear();
for(int i=0;i<n;i++)
cin>>ar[i];
sort(ar,ar+n);
pre[0]=ar[0];
for(int i=1;i<n;i++)
pre[i]=pre[i-1]*1ll+ar[i]*1ll;
func(0,n-1);
while(q--)
{int u1;
cin>>u1;
	if(m1.count(u1))
	cout<<"Yes"<<endl;
	else
	cout<<"No"<<endl;
}
}
return 0;
}
