#include<bits/stdc++.h>
#define all(x) begin(x),end(x)
 
using namespace std;
 
using ll = long long;
using ld = long double;

#define TEST 1

void solve() {
    int n, q;
    cin >> n >> q;
    vector<int> a(n);
    for (auto& val : a) cin >> val;
    sort(all(a));
    set<ll> exists;
    vector<pair<int,int>> arr = {{0, n - 1}};
    while (arr.size()) {
        for (auto& [l, r] : arr) {
            ll s = 0;
            for (int j = l; j <= r; j++) {
                s += a[j];
            }
            exists.insert(s);
        }
        vector<pair<int,int>> nxt;
        for (auto& [l, r] : arr) {
            if (a[l] != a[r]) {
                int mid = (a[r] + a[l]) / 2;
                // [a[l], mid]
                int kek = l;
                for (int j = l; j <= r; j++) {
                    if (a[j] <= mid) {
                        kek = j;
                    } else {
                        break;
                    }
                }
                nxt.push_back({l, kek});
                nxt.push_back({kek + 1, r});
            }
        }
        arr = nxt;
    }
    while (q--) {
        int s;
        cin >> s;
        if (exists.count(s)) {
            cout << "Yes\n";
        } else {
            cout << "No\n";
        }
    }
}


int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
    int t;
    if (TEST) {
        cin >> t;
    } else {
        t = 1;
    }
    while (t--) {
        solve();
    }
}   
