#include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define take(x,n); vector<x> v(n); for(auto &i:v) cin>>i;
set<long long> s;

void sum(vector<long> &v,long l,long r){
    long long m=0;
    for(long i=l;i<=r;i++) m+=v[i];
    s.insert(m);
    if(v[l]==v[r]) return;
    long d=((v[l]+v[r])/2),a=-1;
    for(long i=l;i<=r;i++){
        if(v[i]<=d) a=i;
        else break;
    }
    sum(v,l,a); 
    sum(v,a+1,r);
}

int main()
{
    fast;
    int t; cin>>t;
    while(t--){
        long n,q; cin>>n>>q;
        take(long,n);
        sort(v.begin(),v.end());
        sum(v,0,n-1);
        //for(auto i:s) cout<<i<<" "; cout<<"\n";
        while(q--){
            long tk; cin>>tk;
            if(s.count(tk)) cout<<"Yes\n";
            else cout<<"No\n";
        }
        s.clear();
    }
    return 0;
}