#include <bits/stdc++.h>

#define all(x) (x).begin(),(x).end()
#define sz(x) int(x.size())

using namespace std;
using ll = long long;
using pii = pair<int, int>;
template<typename... T> void rd(T&... args) {((cin>>args), ...);}
template<typename... T> void wr(T... args) {((cout<<args<<" "), ...);cout<<endl;}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int tt;
    cin>>tt;
    while (tt--) {
        int n, q;
        cin>>n>>q;
        vector<int> a(n);
        for (auto& i:a) cin>>i;
        sort(all(a));
        vector<ll> sums, ps(n+1);
        for (int i=0; i<n; i++) ps[i+1]=ps[i]+a[i];
        auto getsum=[&](int l, int r) {
            return ps[r+1]-ps[l];
        };
        function<void(int, int)> cal=[&](int l, int r) {
            sums.push_back(getsum(l, r));
            if (a[l]==a[r]) {
                return;
            }
            if (l==r) {
                return;
            }
            int mid=(a[l]+a[r])/2;
            auto it=upper_bound(a.begin()+l, a.begin()+r+1, mid)-a.begin();
            cal(l, it-1), cal(it, r);
        };
        cal(0, n-1);
        sort(all(sums));
        while (q--) {
            int x;
            cin>>x;
            if (binary_search(all(sums), x)) cout<<"Yes\n";
            else cout<<"No\n";
        }
    }
    return 0;
}

