//  Copyright © 2020 Diego Garcia Rodriguez del Campo. All rights reserved.
#include<bits/stdc++.h>
#define MAX 200005
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair <ll, ll>
#define fi first
#define se second
using namespace std;
typedef long long ll;

ll T, N, Q, a[MAX];
set<ll>s;

void dac(ll l, ll r) {
    if(l > r)
        return;
    ll sum = 0;
    for(ll i = l; i <= r; i ++)
        sum += a[i];
    s.insert(sum);
        
    ll md = (a[l] + a[r]) / 2;
    ll i = l;
    while(i + 1 <= r && a[i + 1] <= md)
        i++;
    if(i != r)
        dac(l, i);
    if(i + 1 != l)
        dac(i + 1, r);
}

void solve() {
    cin >> N >> Q;
    for(ll i = 1; i <= N; i ++)
        cin >> a[i];
    sort(a + 1, a + N + 1);
    s.clear();
    dac(1, N);
    while(Q --) {
        ll sum;
        cin >> sum;
        if(s.find(sum) != s.end())
            cout << "Yes\n";
        else 
            cout << "No\n";
    }
}
 
int main() {
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin) ;
    freopen("output.txt", "w", stdout) ;
    #endif
    optimiza_io
    cin >> T;
    while(T --)
        solve();
    return 0;
}
 
// CHECAR LIMITES 