#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
#define ll      long long int
#define INF2    ((ll)1e18)
#define pii     pair<ll,ll>
#define fi      first
#define se      second
#define vi      vector<ll>
#define pb      push_back
#define sz(a)   (ll)((a).size())
#define all(x)  (x).begin(), (x).end()
#define FIO     ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define W(x)    cout<<#x<<": "<<x<<"\n";
#define SzOf(x) sizeof((x))/1048576;
using namespace std;
template<typename A, typename B>
ostream& operator<<(ostream& os, const pair<A, B>& p){os<<"("<<p.fi<<","<<p.se<<") "; return os;}
template<typename T>
ostream& operator<<(ostream& os, const vector<T>& v){for(auto i: v) os<<i<<" "; return os;}
template<typename T>
void p_a(T a[], ll n){for(ll i=0;i<n;i++) cout<<a[i]<<" "; cout<<"\n";}

int main(){
    //FIO;
    //freopen("input.txt", "r", stdin);
    ll t;
    cin>>t;
    while(t--){
        ll n, m;
        cin>>n>>m;
        ll a[n];for(ll i=0;i<n;i++) cin>>a[i];
        sort(a, a+n);
        ll ps[n];
        for(ll i=0;i<n;i++){
            if(i){
                ps[i]=a[i]+ps[i-1];
            }
            else{
                ps[i]=a[i];
            }
        }
        set<ll> s;
        queue<pii> q;//left right indice
        q.push({0, n-1});
        while(!q.empty()){
            pii v=q.front();
            q.pop();
            ll sum=ps[v.se];
            if(v.fi-1>=0){
                sum-=ps[v.fi-1];
            }
            s.insert(sum);
            if(v.fi==v.se) continue;
            ll mid=(a[v.fi]+a[v.se])/2;
            ll j=v.fi-1;
            while(j+1<=v.se&&a[j+1]<=mid) j++;
            if(j>=v.fi&&(pii){v.fi, j}!=(pii){v.fi, v.se})
                q.push({v.fi, j});
            if(j+1<=v.se&&(pii){j+1, v.se}!=(pii){v.fi, v.se})
                q.push({j+1,v.se});
        }
        for(ll i=0;i<m;i++){
            ll x;
            cin>>x;
            if(s.count(x)){
                cout<<"Yes\n";
            }else{
                cout<<"No\n";
            }
        }
    }
}
