// please no hack please bhai maanja bhai please hack mat kr yar please no hack pls :(
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define INF INT_MAX
#define SINF 1e18
#define pb push_back
#define mod 1000000007
#define PI 3.1415926535897932384626433832795
int bigprime = 999999733;
#define all(a) (a).begin(), (a).end()
#define pll pair< int ,  int >
#define pi pair<int,int>
#define vi vector<int>
#define vpi vector<pi>
// sort(all(arr))
class point{
public:
  int x;
  int y;
  int z;
  point(int a , int b , int c){
    x=a; 
    y=b;
    z=c;
  }
};
string dc(int a , int b){ 
   cout<<" ("<<a<<","<<b<<") -> ";
   string s="";
   return s;
}
string dc(pi a){ 
   cout<<" ("<<a.first<<","<<a.second<<") -> ";
   string s="";
   return s;
}
void yes(){cout<<"Yes"<<endl;}
void no(){cout<<"No"<<endl;}
void Alice(){cout<<"Alice"<<endl;}
void Bob(){cout<<"Bob"<<endl;}
bool isPrime(int n){
    if(n==2)return true;
    if(n==1)return false;
    for(int i=2 ; i<= sqrt(n) ; i++)if(n%i == 0)return false;
    return true;
}
//---------- this is for filling min -----------
//---------isko call krte waqt r=len-1 not n-1
int fillSegTree(int cur , int l , int r,vector<int>&segtree,vector<int>&arr ){
   int n=arr.size();
   if(l==r && l<n){
      segtree[cur]=arr[l];
      return segtree[cur];
   }
   if(l==r && l>=n){
      segtree[cur]=INT_MAX;
      return segtree[cur];
   }
   int left,right;
   left = fillSegTree(2*cur+1 , l , (l+r)/2 , segtree , arr);
   right = fillSegTree(2*cur+2 , (l+r)/2 + 1 , r , segtree , arr);

   segtree[cur] = min(left , right);
   return segtree[cur];
}
//---------this is for finding min query--------------
//---------isko call krte waqt r=len-1 not n-1
int bataSegTree(int cur , int ql , int qr , int l ,int r , vector<int>&segtree ){
   // ql , qr is desired range , l and r is segment tree range
   if(ql<= l && r <= qr){
      return segtree[cur];
   }else if(r<ql || qr<l ){
      return INT_MAX;
   }else{
      int left , right,mid;
      mid=(l+r)/2;
      left  = bataSegTree(2*cur+1 ,ql,qr,l        ,mid, segtree);
      right = bataSegTree(2*cur+2, ql,qr,mid+1    ,r   ,segtree);

      return min(left , right);
   }
}
/* 
 if you wanna update arr[index] to new
 int cur = index+len-1;
 segtree[cur]=new;
 int parent = (cur-1)/2;
 update_SegTree(parent , segtree);
*/
void update_SegTree(int cur , vector<int>&segtree){
   if(cur<0)return;
   int left = segtree[2*cur + 1];
   int right = segtree[2*cur+2];
   segtree[cur]=min(left,right);
   int parent = (cur-1)/2;
   if(parent!=0)update_SegTree( parent , segtree);
}
bool inGrid(int i , int j , int n , int m){
   if(i<0 || j<0 || i>=n || j>= m)return false;
   return true;
}

int digsum(int num){
   int sum=0;
   while(num>0){
      sum+=num%10;
      num/=10;
   }
   return sum;
}
void topo_dfs(int cur , stack<int>&st , unordered_map<int , vector<int>>&mp , unordered_set<int>&vis ){
   vis.insert(cur);
   for(int i=0 ; i< mp[cur].size() ; i++){
      int nex = mp[cur][i];
      if(!vis.count(nex)) topo_dfs(nex , st , mp , vis);
   }
   st.push(cur);
}

vector<int> topoSort(unordered_map<int , vector<int>>&mp){
   stack<int>s;
   unordered_set<int>vis;
   for(auto it=mp.begin() ; it!=mp.end() ; it++){
      int cur = it->first;
      if(!vis.count(cur))topo_dfs(cur,s,mp,vis);
   }
   vector<int>ans;
   while(!s.empty()){
      ans.pb(s.top());s.pop();
   }
   return ans;
}

bool CYCLE_dfs(int s, unordered_map<int ,vector<int> > &adj , unordered_set<int>&gray , unordered_set<int>&black){
    if(gray.count(s))return true;
    if(black.count(s))return false;
    gray.insert(s);
    
    for(int i=0 ; i < adj[s].size() ; i++){
        int nex = adj[s][i];
        if( CYCLE_dfs(nex , adj , gray , black)  )return true;
    }
    
    gray.erase(s);
    black.insert(s);
    return false;
}
// for directed graph
bool isCyclic(unordered_map<int ,vector<int> > &adj)
{
    unordered_set<int>gray;
    unordered_set<int>black;
    vector<int>white;
    for(auto it=adj.begin() ; it!=adj.end() ; it++){
       int w = it->first;
       white.pb(w);
    }
    for(int  p = 0; p < white.size(); p++){
         int i = white[p];
        if(!gray.count(i) && !black.count(i)){
            if(CYCLE_dfs(i , adj , gray , black))return true;
        }
    }
    return false;
}

bool compstd(pair<int,int>l , pair<int,int>r){
      return l.first > r.first ;
}

// struct qcomparator { 
//     bool operator()(int l, int r) 
//     { 

//         return left<right;
//     } 
// };

void chalBata(int l, int r , vi &pre , vi& arr , bool &mila , int &desired , set<int>&mp){
  if(mila || l>r)return;
  int sum = pre[r];
  if(l-1 >=0)sum -= pre[l-1];

  mp.insert(sum);
  // cout<< dc(l,r) << sum << endl;
  if(sum == desired){
    mila=true;
    return;
  }
  if(sum < desired)return;
  if(arr[l] == arr[r])return;


  int mid = (arr[l] + arr[r])/2;
  int low=l,high=r ,point=-1;
  while(low<=high){
    int M = (low + high)/2;

    if(arr[M] <= mid){
      point = M;
      low=M+1;
    }else high = M-1; 
  }

  chalBata(l , point , pre , arr , mila , desired,mp);
  chalBata(point+1 , r , pre , arr , mila , desired,mp);

}
//-----------------------------------------------------support functions end----------------------------------
signed  main() {
   #ifndef ONLINE_JUDGE
   freopen("input.txt","r",stdin);
   freopen("out.txt","w",stdout);
   #endif
   
   std::ios::sync_with_stdio(false);
   cin.tie(nullptr);
   cout.tie(nullptr);
// faltu part end here-----------------------------------------------------------------
   int t; cin >> t;
   while(t--){
    int n,q;cin>>n>>q;
    vector<int>arr(n,0);
    for(int i=0 ; i<n ; i++)cin>>arr[i];
    sort(arr.begin() , arr.end());
    vi pre(n,arr[0]);
    for(int i=1 ; i<n ; i++)pre[i]= pre[i-1]+arr[i];
    int desired=0 ;
    set<int>mp; 
    bool mila=false;
    chalBata(0,n-1 , pre , arr ,mila , desired , mp);
    while(q--){
      cin>>desired;
      mila=false;
      if(mp.count(desired))mila=true;
      if(mila)yes();
      else no();
    }
        
   }
//end -----------------------------------------------------------------------------------
   return 0;
   
} 