#include <bits/stdc++.h>
using namespace std;

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

    int T;
    cin >> T;
    while (T--) {
        int n, k;
        cin >> n >> k;
        int need = n / k;
        vector<unsigned char> v(n);
        for (int i = 0; i < n; ++i) {
            long long x;
            cin >> x;
            v[i] = (unsigned char)((x & 1LL) ^ 1LL);
        }
        sort(v.begin(), v.end(), greater<unsigned char>());
        int cnt = 0;
        for (int i = 0; i < n; ++i) {
            if (!v[i]) break;
            ++cnt;
        }
        if (cnt >= need) cout << "YES\n";
        else cout << "NO\n";
    }
    return 0;
}
