#include <bits/stdc++.h>
#define endl '\n'
#define LL long long
#define LD long double
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define debug(x) cerr << #x << " is " << x << endl;
using namespace std;
int const MAXN = 2e6 + 9;
int a[MAXN];
int main(){
    ios_base::sync_with_stdio (0),cin.tie(0);
    int T;
    cin >> T;
    while(T--){
        int n, k, m;
        cin >> n >> k >> m;
        for(int i = 1; i <= n; i++) a[i] = 0;
        for(int i = 0; i < m; i++){
            int x;
            cin >> x;
            a[x]++;
        }
        if((n - m) % (k - 1)) {
            cout << "NO" << endl;
            continue;
        }
        int sum = 0;
        bool cond = false;
        for(int i = 1; i <= n; i++){
            sum += a[i] == 0;
            if(sum >= k / 2 && (n - m - sum) >= k/2 && a[i]){
                cond = true;
            }
        }
        if(cond) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
}