#include<algorithm>
#include<iostream>
#include<fstream>
#include<map>
using namespace std;
typedef long long ll;
int t,n,m,s;
int a[100005];
ll b[100005];
map<long long,bool>M;
int Find(int x,int y,int z){
	int l=x,r=y,mid=(x+y)>>1;
	while(l<=r){
		mid=(l+r)>>1;
		if(a[mid]<=z&&a[mid+1]>z){
			return mid;
		}else if(a[mid]>z){
			r=mid-1;
		}else{
			l=mid+1;
		}
	}
}
void Divide_n(int x,int y){
	M[b[y]-b[x-1]]=1;
	if(a[x]==a[y])return;
	int stdn=(a[x]+a[y])/2;
	int pos=Find(x,y,stdn);
	M[b[pos]-b[x-1]]=M[b[y]-b[pos]]=1;
	Divide_n(x,pos);
	Divide_n(pos+1,y);
}
int main(){
	scanf("%d",&t);
	while(t--){
		scanf("%d%d",&n,&m);
		for(int i=1;i<=n;i++){
			scanf("%d",&a[i]);
		}
		M.clear();
		sort(a+1,a+1+n);
		for(int i=1;i<=n;i++){
			b[i]=b[i-1]+ll(a[i]);
		}
		Divide_n(1,n);
		while(m--){
			scanf("%d",&s);
			if(M[s]){
				printf("Yes\n");
			}else{
				printf("No\n");
			}
		}
	}
	return 0;
}