#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<queue>
#include<cmath>
#include<map>
#include<vector>
#include<stack> 
#include<set>
#include<deque>
#define PI 3.1415
#define base 233
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const double eps = 1e-8;
const ll mod = 1e9 + 7;
const ll maxn = 1e5 + 10;
const ull modd = 212370440130137957ll;
int lowbit(int x) { return x & -x; }
ll gcd(ll a, ll b) { if (b == 0)return a; return gcd(b, a % b); }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll quick_power(ll a, ll b, ll c) { ll ans = 1; a = a % c; while (b) { if (b & 1)ans = (ans * a) % c; b = b >> 1; a = (a * a) % c; }return ans; }
bool isprim(ll x) { int flag = 1; for (int i = 2; i * i <= x; i++) { if (x % i == 0) { flag = 0; break; } }if (flag) return 1; else return 0; }


int t;
int n, q;
ll a[maxn];
ll sum[maxn];
map<ll, ll> ans;
void Do(int l, int r)
{
	ll mid = (a[l] + a[r]) >> 1;
	ans[sum[r] - sum[l - 1]] = 1;
	int pos = upper_bound(a + 1, a + 1 + r, mid) - a;
	if (pos <= r)
	{
		Do(l, pos - 1);
		Do(pos, r);
	}
	return;
}

int main()
{
	cin >> t;
	while (t--)
	{
		ans.clear();
		cin >> n >> q;
		for (int i = 1; i <= n; ++i)
		{
			cin >> a[i];
		}
		sort(a + 1, a + 1 + n);
		for (int i = 1; i <= n; ++i)
		{
			sum[i] = sum[i - 1] + a[i];
		}
		Do(1, n);
		while (q--)
		{
			ll s;
			cin >> s;
			if (ans[s] == 1)
				cout << "Yes" << endl;
			else
				cout << "No" << endl;
		}
	}
	return 0;
}