#include <bits/stdc++.h>
using namespace std;

int b[200100];

int l[200100], r[200100];

int main(){
    int T; scanf("%d", &T);
    int tot = T;
    int num = 0;
    while (T--){
        num++;
        int N, K, M; scanf("%d%d%d", &N, &K, &M);
        for (int i = 1; i <= M; i++) scanf("%d", &b[i]);
        int ind = 1;
        int cnt = 0;
        for (int i = 1; i <= N; i++){
            l[i] = 0;
            if (ind == M+1 || b[ind] != i){
                cnt++;
            } else {
                ind++;
                l[i] = cnt;
            }
        }
        if (cnt%(K-1) != 0){
            printf("NO\n");
            continue;
        }
        bool work = false;
        for (int i = 1; i <= N; i++){
            if (l[i] >= K/2 && cnt-l[i] >= K/2){
                work = true;
                break;
            }
        }
        if (work) printf("YES\n");
        else printf("NO\n");
    }
}