#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;
        int cnt = 0;
        for (int i = 0; i < n; ++i) {
            long long x;
            cin >> x;
            cnt += ((x & 1LL) == 0);
        }
        if (cnt >= need) cout << "YES\n";
        else cout << "NO\n";
    }
    return 0;
}
