#include <bits/stdc++.h>

using namespace std;
typedef long long LL;
const int NMAX = 1e5 + 5;

int v[NMAX];
LL sp[NMAX];
set<LL>sums;

void divide(int st, int dr)
{
    int mij = (v[st] + v[dr]) / 2;

    LL sum = sp[dr] - sp[st - 1];

    //cout << st << " " << dr << " " << sum << '\n';

    sums.insert(sum);

    if(st >= dr)
        return;

    int stC = st, drC = dr;

    while(stC <= drC)
    {
        int mijC = (stC + drC) / 2;

        if(v[mijC] <= mij)
            stC = mijC + 1;
        else
            drC = mijC - 1;
    }

    if(drC == dr)
        return;

    divide(st, drC);
    divide(drC + 1, dr);
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int t;

    cin >> t;

    for(int test = 0; test < t; test++)
    {
        int n, q;

        cin >> n >> q;

        for(int i = 1; i <= n; i++)
            cin >> v[i];

        sort(v + 1, v + 1 + n);

        for(int i = 1; i <= n; i++)
            sp[i] = sp[i - 1] + 1LL * v[i];

        sums.clear();
        divide(1, n);

        for(int i = 1; i <= q; i++)
        {
            int s;

            cin >> s;

            if(sums.find(s) != sums.end())
                cout << "Yes\n";
            else
                cout << "No\n";
        }
    }

    return 0;
}
