#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e6+5;
const int mod = 1e9+7;
const int inf = 0x3f3f3f3f;
#define for1(i,n) for(int i=1;i<=n;i++)
#define forn(i,n) for(int i=0;i<n;i++)

int a[maxn], n,m;
ll add[maxn];
vector<ll> ans;
void dfs(int L, int R){
    int mid = (a[L]+a[R])>>1;
    int idx = upper_bound(a+L,a+R+1,mid) - a;    
    //printf("[%d %d], [%d %d]\n",L,idx-1,idx,R);
    //printf("[%d %d]\n",L,R);
    ans.push_back(add[R]-add[L-1]);
    //ans.push_back(add[R]-add[idx-1]);
    if(idx>R) return;
    if(L<=idx-1) dfs(L,idx-1); 
    if(idx<=R) dfs(idx,R);
}
int main(){
    int t; scanf("%d",&t);while(t--){
        ans.clear();     
        scanf("%d%d",&n,&m);
        for1(i,n){
            scanf("%d",&a[i]);
        }
        sort(a+1,a+n+1);
        for1(i,n) add[i] = add[i-1] + a[i];
        //int L=1, R=n;
        dfs(1,n);
        //for(auto v : ans) cout << v << endl;
        sort(ans.begin(),ans.end());
        for1(i,m){
            int q; scanf("%d",&q);
            if(binary_search(ans.begin(),ans.end(),q)) printf("Yes\n");
            else printf("No\n");
        }
    }
}
/*2
5 5
1 2 3 4 5
1
8
9
12
6
5 5
3 1 3 1 3
1
2
3
9
11
*/