#include <bits/stdc++.h>
using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) ((int)(v).size())
#define compress(v) sort(all(v)), v.erase(unique(all(v)), v.end())
#define MEM(v, x) memset(v,x,sizeof(v))
typedef long long ll;
typedef pair<int, int> pii;
const int inf = 0x3f3f3f3f;
const int MAX = 1e5;

int tc;
vector<int> v;
set<ll> s;

void divide(int l, int r) {
	ll sum = 0, miv = inf, mav = -inf, pos = -1, mid;
	for (int i = l; i <= r; i++) {
		sum += v[i];
		miv = min(miv, (ll)v[i]);
		mav = max(mav, (ll)v[i]);
	}
	mid = (miv + mav) / 2;
	for (int i = l; i <= r; i++) {
		if (v[i] > mid) {
			pos = i;
			break;
		}
	}
	s.insert(sum);
	if (pos - 1 < 0 || pos - 1 == r) return;
	divide(l, pos - 1), divide(pos, r);
}

void solve() {
	int n, q;
	cin >> n >> q;
	s.clear();
	v.clear(), v.resize(n);
	for (int&i : v)cin >> i;
	sort(all(v));
	divide(0, n - 1);
	while (q--) {
		int c; cin >> c;
		if (s.count(c)) cout << "Yes\n";
		else cout << "No\n";
	}
}


int main() {
	cin.tie(NULL); cout.tie(NULL);
	ios_base::sync_with_stdio(false);

	cin >> tc;
	while (tc--) {
		solve();
	}
}