#include<bits/stdc++.h>
#define LL long long
#define dl double
template <class T>
void rd(T &x){
    x=0;T f=1;char ch=getchar();
    while(ch<'0' || ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch<='9' && ch>='0'){x=x*10+ch-'0';ch=getchar();}x*=f;
}

using namespace std;

const int N = 1e5 + 10;

int T;
int n,q;
int a[N];
LL s[N];
set<LL>S;

void work(int l,int r){
    S.insert(s[r] - s[l - 1]);
    if(l == r)return ;
    int mid = (a[l] + a[r]) / 2;
    mid = upper_bound(a + l,a + r + 1,mid) - a;
    if(mid == r + 1)return ;
    work(l,mid - 1);work(mid,r);
}

int main(){
    // freopen("in.txt","r",stdin);
    // freopen("o.txt","w",stdout);
    rd(T);
    while(T--){
        rd(n);rd(q);
        for(int i = 1;i <= n;i++)rd(a[i]);
        sort(a + 1,a + n + 1);
        for(int i = 1;i <= n;i++)s[i] = s[i - 1] + a[i];
        S.clear();
        work(1,n);
        while(q--){
            int x;rd(x);
            if(S.find(x) == S.end())puts("No");
            else puts("Yes");
        }
    }
    return 0;
}
/**/