#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define int long long
#define deb(x) cout << "[ " << #x << " = " << x << "] "
void helper(vector<int>& v,vector<int>& prefix,int i,int j,unordered_set<int>& set)
{
   if(i>j)
   return ;
   if(i==0)
      set.insert(prefix[j]);
   else
      set.insert(prefix[j]-prefix[i-1]);
   
   if(v[i]==v[j]) return;

   int mid=(v[i]+v[j])/2;
   int index=upper_bound(v.begin(),v.end(),mid)-(v.begin());
   
   
   helper(v,prefix,i,index-1,set);
   helper(v,prefix,index,j,set);



}
void solve()
{
   int n,q;cin>>n>>q;

   vector<int> v(n),prefix(n);
   for(int i=0;i<n;i++)
      cin>>v[i];
   sort(v.begin(),v.end());
   
     for(int i=0;i<n;i++)
      {
        prefix[i]=v[i];
        if (i!=0)
        {
           prefix[i]+=prefix[i-1];
        }
        
      }


   unordered_set<int> set;
   
   helper(v,prefix,0,n-1,set);
   while(q--)
   {
      int sum;cin>>sum;
      if(set.find(sum)!=set.end())
      cout<<"Yes";
      else
         cout<<"No";

     
      cout<<"\n";
      
   }
   
}
signed main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   int t = 1;
   cin >> t;
   while (t--)
      solve();
   return 0;
}