#include <bits/stdc++.h>
#define int long long
#define PI pair<int,int>
using namespace std;
const int maxm=2e6+5;
int b[maxm];
int n,k,m;
void solve(){
    cin>>n>>k>>m;
    for(int i=1;i<=m;i++){
        cin>>b[i];
    }
    if((n-m)%(k-1)){
        cout<<"NO"<<endl;
        return ;
    }
    for(int i=1;i<=m;i++){
        if(b[i]-i>=(k-1)/2&&(n-b[i])-(m-i)>=(k-1)/2){
            cout<<"YES"<<endl;
            return ;
        }
    }
    cout<<"NO"<<endl;
}
signed main(){
    ios::sync_with_stdio(0);
    int T;cin>>T;
    while(T--){
        solve();
    }
    return 0;
}
/*
每次操作减少k-1个数,那么当(n-m)%(k-1)!=0时一定无解.


*/
