#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
using namespace std;

typedef const int cint;
typedef long long ll;
const int MAXN=1e5+5;
int n,q;
vector<ll> sum;
ll a[MAXN],s[MAXN],tot[MAXN];

void dfs(cint& l,cint& r)
{
	sum.emplace_back(tot[r]-tot[l-1]);
	if(l==r)	return;
	register const ll mid=(a[l]+a[r])/2;
	if(a[r]<=mid || a[l]>mid)	return;
	register cint pos=upper_bound(a+l,a+1+r,mid)-a-1;
	dfs(l,pos);
	dfs(pos+1,r);
}
void solve(void)
{
	sort(a+1,a+1+n);
	for(register int i=1;i<=n;i++)	tot[i]=tot[i-1]+a[i];
	dfs(1,n);
	sort(sum.begin(),sum.end());
	for(register int i=1;i<=q;i++)
		puts(binary_search(sum.begin(),sum.end(),s[i])?"Yes":"No");
	sum.clear();
	memset(tot,0,sizeof(tot));
}

int main()
{
	ios_base::sync_with_stdio(false);
	register int T;cin>>T;
	while(T--)
	{
		cin>>n>>q;
		for(register int i=1;i<=n;i++)	cin>>a[i];
		for(register int i=1;i<=q;i++)	cin>>s[i];
		solve();
	}
	return 0;
}