#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
unordered_set <ll> st;
void add(ll a[],ll start,ll end)
{
	 ll sum=0L;
	 //cout<<start<<" "<<end<<endl;
	 for(ll i=start;i<=end;i++)
	 {
	 	//cout<<a[i]<<endl;
	 		sum+=a[i];
	 }
	// cout<<sum<<endl;
	 st.insert(sum);
		ll mid=(a[start]+a[end])/2;
		ll pos=-1;
		for(ll i=start;i<=end;i++)
		{
			if(a[i]<=mid)
				pos=i;
			else 
				break;
		}
		if(pos==-1 || pos==end)
			return;
		add(a,start,pos);
		add( a,pos+1,end);



}
int main()
{
              #ifndef ONLINE_JUDGE
              freopen("input.txt","r",stdin);
              freopen("output.txt","w",stdout);
              #endif
              ll t;
              cin>>t;
              while(t--)
              {
              	ll n,q;
              	cin>>n>>q;
              	//vector<ll> a;
              	ll a[n];
              	for(ll i=0;i<n;i++)
              	{
              		cin>>a[i];
              	}
              	//sort(a.begin(),a.end());
              	sort(a,a+n);
              	st.clear();
              	add(a,0,n-1);
              	while(q--)
              	{
              		ll y;
              		cin>>y;
              		if(st.find(y)==st.end())
              		{
              			cout<<"No"<<endl;
              		}
              		else 
              			cout<<"Yes"<<endl;
              	}
              
              	

              }
              return 0;
             }