#include <iostream>
#include <iomanip>
#include <math.h>
#include <algorithm>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <cassert>
#include <deque>
#include <queue>
#include <vector>
#include <stack>
#include <string>
#include <fstream>
#include <ctime>

using namespace std;

#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2")

using ll = long long;
using ld = long double;
using pii = pair<int, int>;

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define vec vector
#define pb push_back

const int INF = 1e9;

void solve() {
    int n, k;
    cin >> n >> k;
    int cnt1 = 0, cnt2 = n / k;
    for (int i = 0; i < n; ++i) {
        int x;
        cin >> x;
        if (x % 2 == 0) cnt1++;
    }
    if (cnt1 >= cnt2) cout << "YES\n";
    else cout << "NO\n";
}

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    srand(time(0));
    int t = 1; cin >> t;
    for (; t > 0; --t) {
        solve();
    }
}