#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main(){
    ios::sync_with_stdio(0);
    int t;
    cin >> t;
    while(t--){
        int n,k,m;
        cin >> n >> k >> m;
        vector<int> b(m,0);
        for(auto &it:b) cin >> it;
        for(auto &it:b) it--;
        if(m==n){
            cout << "YES\n";
            continue;
        }
        int o = n-m;
        if(o%(k-1)){
            cout << "NO\n";
            continue;
        }
        vector<int> bmap(n,0);
        for(auto it:b)
            bmap[it]=1;
        int presum = 0;
        bool failed = true;
        for(int i = 0; i<n; i++){
            presum+=1-bmap[i];
            if(bmap[i]==1&&presum>=(k-1)/2&&o-presum>=(k-1)/2)
                failed = false;
        }
        if(failed)
            cout << "NO\n";
        else
            cout << "YES\n";
    }    
    return 0;
}