#include <bits/stdc++.h>
#define ll long long
#define endl '\n'
#define fastIO ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define prec fixed<<setprecision(9)
using namespace std;

int main()
{
    fastIO
    //lulz
    int t; cin >> t;
    while (t--) {
        int n,k,m;
        cin>>n>>k>>m;
        vector<int> arr(m); for(int i=0;i<m;i++) {cin>>arr[i]; arr[i]--;}
        vector<int> in(n,0); for(int &i : arr) in[i]=1;
        int ct = n - m; int half = k/2;
        bool works = false;
        if (ct%(k-1)==0){
            int f = 0,l = n-1;
            ct = 0;
            while(true){
                if(in[f]==0) ct++;
                if(ct==half) break;
                f++;
            }
            ct = 0;
            while(true){
                if(in[l]==0) ct++;
                if(ct==half) break;
                l--;
            }
            for(int i=f+1;i<l;i++){
                if(in[i]==1) works = true;
            }
        }
        cout<<(works ? "YES" : "NO")<<endl;
    }
}