#include<map>
#include<cstdio>
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
#define Maxi 100005
typedef long long ll;
int a[Maxi];
ll sum[Maxi];
map<ll, bool> mp;
void DFS(int left, int right, int n) {
	mp[sum[right] - sum[left - 1]] = true;
	if (a[left] == a[right]) return;
	int mid = (a[left] + a[right]) / 2;
	int pos = upper_bound(a + 1, a + n + 1, mid) - a;
	DFS(left, pos - 1, n); DFS(pos, right, n);
}
int main() {
	int t;
	scanf("%d", &t);
	while (t--) {
		int n, q;
		mp.clear();
		scanf("%d%d", &n, &q);
		for (int i = 1; i <= n; i++)
			scanf("%d", &a[i]);
		sort(a + 1, a + n + 1);
		for (int i = 1; i <= n; i++)
			sum[i] = sum[i - 1] + a[i];
		DFS(1, n, n);
		while (q--) {
			int s;
			scanf("%d", &s);
			puts(mp[s] ? "Yes" : "No");
		}
	}
	return 0;
}
	  	 	 			  				  	    			