#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int n, k, m, b[N];
int main() {
	int t;
    scanf("%d", &t);
    while (t){
    	t--;
    	scanf("%d%d%d", &n, &k, &m);
    	for (int i=0; i<m; i++) scanf("%d", b+i);
		if ((n-m)%(k-1)) printf("NO\n");
		else {
			bool ok = 0;
			for (int i=0; i<m; i++){
				int x=b[i]-i-1 , y=(n-b[i])-(m-i-1) ;
				if (x>=k/2 && y>=k/2){
					ok=1;
					break;
				}
			}
			if (ok) printf("YES\n");
			else printf("NO\n");
		}
	}
    return 0;
}