#include <bits/stdc++.h>
#define endl '\n'
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define allr(x) (x).rbegin(), (x).rend()

using namespace std;

typedef __int128 LL;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;

const int mod = 1e9+7;
const int inf = 1<<30;

int main() {
    #ifdef ernestico
        freopen ("a.in", "r", stdin );
    #endif
    ios_base::sync_with_stdio(0); cin.tie(0);
    
    int t; cin >> t;
    while ( t-- ) {
        int n, k, m; cin >> n >> k >> m;
        vector<int> b(m);
        for ( auto &i : b) cin >> i;
        
        if ( (n-m)%(k-1) != 0 ) {
            cout << "NO" << endl;
            continue;
        }

        int x = b[0] - 1;
        int y = (n - m - x);
        bool ok = false;
        if ( x >= (k-1)/2 && y >= (k-1)/2 ) 
            ok = true;
        for ( int i = 1; i < m; i ++ ) {
            x += ( b[i] - b[i-1] - 1 );
            y -= ( b[i] - b[i-1] - 1 );

            if ( x >= (k-1)/2 && y >= (k-1)/2 ) 
                ok = true;
        }

        if ( ok ) cout << "YES" << endl;
        else cout << "NO" << endl;
    }

    return 0;
}