#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define pii pair<int, int>
#define pll pair<long long,long long>
#define vl vector<long long>
#define vll vector<pll>
#define vi vector<int>
#define vii vector<pii>
#define sws ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl '\n'
#define tcase int tt; cin>>tt; while(tt--)
#define tcase2 int tt; cin>>tt; for(int qq=1;qq<=tt;qq++)
using namespace std;
typedef long long int ll;
typedef  unsigned long long int ull;
typedef long double ld;
const int MAXN = 1000002;
const int MOD2 = 998244353;
const int MOD = 1000000007; 
const int INF = 1e8;
const ld EPS = 1e-7;
// Extra
#define forn(i, n) for(int i = 0; i < (int)n; i++)
#define forne(i, a, b) for(int i = a; i <= b; i++)
#define all(x) x.begin(), x.end()
#define trav(a, x) for(auto& a : x)
#define fill(x,y) memset(x,y,sizeof(x))
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
ll mul(ll x, ll y)
{
    return (x * 1ll * y) % MOD2;
}
 
ll fastpow(ll x, ll y)
{
    ll z = 1;
    while(y)
    {
        if(y & 1) z = mul(z, x);
        x = mul(x, x);
        y >>= 1;
    }
    return z;
}
ll modinv(ll n,ll p)
{
	return fastpow(n,p-2) ;
}
struct Comp {
  bool operator()(const std::pair<int, int> &a, const std::pair<int, int> &b) {
    if (a.first != b.first) {
      return a.first > b.first;
    }
    return a.second >b.second;
  }
};
vector<ll>ans ;
ll a[100001] ;

void rec(ll l,ll r, ll sum)
{   ans.pb(sum) ;
   //cout<<l<<" "<<r<<" "<<sum<<"\n" ;
     if(l==r)
     return ;
    
     if(a[l]==a[r])
     {
         ans.pb(a[l]*(r-l+1)) ;
         return ;
     }
	ll x=(a[l]+a[r])/2 ;
	ll i=l,j=l,f=0 ;
	for( i=l;i<r;i++)
	{
		if(a[i]<=x)
		{
		j=i;
		f+=a[i];
	    }
		else
		break ;
	}
//	cout<<sum-f<<"\n";
	//cout<<j+1<<" "<<r<<"\n" ;
	rec(l,j,f) ;
	rec(j+1,r,sum-f) ;
}
int main(int argc, char** argv)
{   sws ;
  cout<<setprecision(10);
 // ll x=1 ;
   tcase
   {
       ans.clear() ;
    ll n,q ;
   cin>>n>>q ;
   //ll a[n] ;
   forn(i,n)
   cin>>a[i] ;
   
   sort(a,a+n) ;
   ll s=0 ;
   forn(i,n)
   s+=a[i] ;
   ans.clear() ;
   rec(0,n-1,s) ;
   sort(ans.begin(),ans.end()) ;
   //orn(i,ans.size())
 //  cout<<ans[i]<<" ";
   //cout<<"\n" ;
   while(q--)
   {
   	ll x ;
   	cin>>x ;
   	//ll pos=ans.find(x) ;
   	if(binary_search(ans.begin(),ans.end(),x))
   	cout<<"Yes\n" ;
   	else
   	cout<<"No\n" ;
   }
   }
return 0 ;
}