#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
using ll = long long;
set<ll> s;
void split(vector<int> &a) {
    int n = a.size();
    vector<int> b, c;
    int mi = 1e7, ma = 0;
    ll sum = 0;
    for(int x : a) mi = min(mi, x), ma = max(ma, x), sum += x;
    s.insert(sum);
    int md = (mi + ma) / 2;
    for(int x : a) if(x <= md) b.push_back(x); else c.push_back(x);
    if(!b.empty() && !c.empty()) {
        split(b);
        split(c); 
    }
}
int main() {
    int T; cin >> T;
    while(T--) {
        s.clear();
        int n, q; cin >> n >> q;
        vector<int> a(n);
        for(int i = 0; i < n; i++) cin >> a[i];
        split(a);
        while(q--) {
            int x; cin >> x;
            cout << (s.find(x) == s.end() ? "No" : "Yes") << endl;
        }
    }
    return 0;
}