#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define llu unsigned long long
#define sf scanf
#define pf printf
#define pb push_back
#define pi acos(-1)
#define time_save ios_base::sync_with_stdio(false); cin.tie(NULL);

//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move

ll ar[100005],n;
map<ll,ll>mp;

void pre(ll x,ll y){

    ll sum=0;
    for(ll i=x;i<=y;i++){
        sum+=ar[i];
    }
    mp[sum]=1;
    ll mid=(ar[x]+ar[y])/2;

    ll pos=-1;
    for(ll i=x;i<=y;i++){
        if(ar[i]<=mid){
            pos=i;
        }
        else
            break;
    }
    if(pos==-1||pos==y)
        return;
    pre(x,pos);
    pre(pos+1,y);
}
int main()
{
    //time_save;
    ll t;
    cin>>t;
    while(t--){
        ll q,x;
        mp.clear();
        cin>>n>>q;
        for(ll i=0;i<n;i++){
            cin>>ar[i];
        }
        sort(ar,ar+n);
        pre(0,n-1);
        for(ll i=0;i<q;i++){
            cin>>x;
            if(mp[x]==1)
                cout<<"Yes"<<endl;
            else
                cout<<"No"<<endl;
        }
    }
    return 0;
}


