#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring> 

using namespace std;

const int N = 1e6 + 10;
int n,m;
int a[N];
vector<long long>v;
long long qzh[N];

void dfs(int x,int y){
	v.push_back(qzh[y] - qzh[x - 1]);
	int mid = (a[x] + a[y]) >> 1;
	int pos = lower_bound(a + 1,a + y + 1,mid) - a;
	if(a[pos] == mid){
		while(pos + 1 <= y && a[pos + 1] == mid){
			++pos;
		}
	}else if(a[pos] > mid){
		--pos;
	}
	if(pos == y) return;
	dfs(x,pos);
	if(pos + 1 == x) return;
	dfs(pos + 1,y);
}

int main(){
	ios::sync_with_stdio(false);
	int t;
	cin >> t;
	
	while(t--){
		memset(qzh,0,sizeof qzh);
		v.clear();
		cin >> n >> m;
		
		for(int i = 1; i <= n; i++){
			cin >> a[i];
		}
		
		sort(a + 1,a + n + 1);
		
		for(int i = 1; i <= n; i++){
			qzh[i] = qzh[i - 1] + a[i];
		}
		
		dfs(1,n);
		
		sort(v.begin(),v.end());
		
		for(int i = 1; i <= m; i++){
			int x;
			cin >> x;
			int pos = lower_bound(v.begin(),v.end(),x) - v.begin();
			if(pos == v.size()){
				cout << "No" << endl;
			}else{
				if(v[pos] == x){
					cout << "Yes" << endl;
				}else  cout << "No" << endl;
			}
		}
		
	}
	
	
	return 0;
}