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

void solve() {
    int n, m, k;
    cin >> n >> k >> m;

    int x;
    vector<int> a(n + 1, 0);
    for (int i = 0; i < m; ++i) {
        cin >> x;
        a[x] = 1;
    }

    int c0 = n - m, c = 0;
    bool can = false;
    can |= c0 == 0;
    for (int i = 1; i <= n; ++i) {
        if (a[i] == 0) ++c;
        else can |= (c >= k / 2) && ((c0 - c) >= k / 2);
    }
    if (c0 % (k - 1) != 0) can = false;
    puts(can ? "YES" : "NO");
}

int main () {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int T;
    cin >> T;
    while(T--) solve();
    return 0;
}