#include <iostream>
#include <cstdio>
#include <algorithm>
#include <map>
using namespace std;
const int N=100010;
typedef long long LL;
int n,m,flag,x;
LL a[N],sum[N];
map<LL ,int>mp;
void dfs(int l,int r)
{
    mp[sum[r]-sum[l-1]]=1;
    if(l>=r||a[l]==a[r])return ;
    int v=(a[l]+a[r])/2;
    int mid=upper_bound(a+l,a+r+1,v)-a;
    dfs(l,mid-1),dfs(mid,r);
}
int main(void)
{
    int t;
    cin>>t;
    while(t--)
    {
        cin>>n>>m;
        mp.clear();
        for(int i=1;i<=n;i++)
        {
            scanf("%lld",&a[i]);
        }
        sort(a+1,a+n+1);
        for(int i=1;i<=n;i++)sum[i]=sum[i-1]+a[i];
        dfs(1,n);
        while(m--)
        {
            //int x;
            cin>>x;
            if(mp[x])cout<<"Yes"<<endl;
            else cout<<"No"<<endl;
            
        }
    }
    return 0;
}