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

const int M = 2e5 + 5;

int n, k, m;

signed main() {
    int T;
    cin >> T;
    while (T--) {
        cin >> n >> k >> m;
        bool flag = false;
        for (int i = 1, b; i <= m; ++i) {
            cin >> b;
            if (b - i >= k / 2 && n - b - (m - i) >= k / 2) flag = true;
        }
        cout << (flag && ((n - m) % (k - 1) == 0)? "YES" : "NO") << "\n";
    }
    return 0;
}