 #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define fo(i,a,n) for(ll i=a;i<n;i++)
#define speed  ios_base::sync_with_stdio(false);cin.tie(NULL);
#define pi 3.1415926536
#define mod 1000000007
#define pb push_back
#define mk make_pair
#define F first
#define S second

map<ll,bool>mp;

void findsum(ll l,ll r,vector<ll>&v,vector<ll>&pref)
{
     mp[pref[r]-(l>0?pref[l-1]:0)]=true;

     ll mid=(v[l]+v[r])/2;
     auto x=upper_bound(v.begin(),v.end(),mid)-v.begin();
     if(x<=l || x>r)
        return;
   findsum(l,x-1,v,pref);
   findsum(x,r,v,pref);
}
int solve()
{
    ll n,q;
   cin>>n>>q;
   vector<ll>v(n),pref(n+1);
   fo(i,0,n)cin>>v[i];
   sort(v.begin(),v.end());
   pref[0]=v[0];
   fo(i,1,n)
   {
       pref[i]=pref[i-1]+v[i];
   }
   ll l=0,r=n-1;
   mp.clear();
   findsum(l,r,v,pref);
   fo(i,0,q)
   {
       ll a;cin>>a;
       if(mp[a])
        cout<<"Yes"<<endl;
       else cout<<"No"<<endl;
   }
   return 0;
}
int main()
{
   speed;
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
   ll t;
   cin>>t;
   while(t--)
   {
       solve();
   }
}
