#include<bits/stdc++.h>
#define LL long long
using namespace std;
inline int read()
{
	char x='\0';
	int fh=1,sum=0;
	for(x=getchar();x<'0'||x>'9';x=getchar())if(x=='-')fh=-1;
	for(;x>='0'&&x<='9';x=getchar())sum=sum*10+x-'0';
	return fh*sum;
}
const int N=100009;
int T,n,m;
int ai[N];
LL si[N];
multiset<LL>q;
inline void divide(int lp,int rp)
{
	q.insert(si[rp]-si[lp-1]);
	if(ai[lp]==ai[rp])return;
	int mid=(ai[lp]+ai[rp])/2;
	int pos=upper_bound(ai+lp,ai+rp+1,mid)-ai-1;
	divide(lp,pos),divide(pos+1,rp);
}
inline void solve()
{
	q.clear();
	n=read(),m=read();
	for(int i=1;i<=n;i++)ai[i]=read();
	sort(ai+1,ai+n+1);
	for(int i=1;i<=n;i++)si[i]=si[i-1]+ai[i];
	divide(1,n);
	for(int i=1;i<=m;i++)
	{
		int s=read();
		if(q.find(s)!=q.end())printf("Yes\n");
		else printf("No\n");
	}
}
int main()
{
	T=read();
	while(T--)solve();
	return 0;
}
