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

#define rep(i, a, n) for(int i=(a); i<(n); ++i)
#define per(i, a, n) for(int i=(a); i>(n); --i)
#define pb emplace_back
#define mp make_pair
#define clr(a, b) memset(a, b, sizeof(a))
#define all(x) (x).begin(),(x).end()
#define lowbit(x) (x & -x)
#define fi first
#define se second
#define lson o<<1
#define rson o<<1|1
#define gmid l[o]+r[o]>>1
 
using LL = long long;
using ULL = unsigned long long;
using pii = pair<int,int>;
using PLL = pair<LL, LL>;
using UI = unsigned int;
 
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const double EPS = 1e-8;
const double PI = acos(-1.0);

const int N = 2e5 + 10;

int T, n, k, m, a[N];
bool vis[N];

bool ok(){
	if((n - m) % (k - 1) != 0){
		return 0;
	}
	if(m == n)	return 1;
	rep(i, 1, n+1)	vis[i] = 0;
	rep(i, 0, m){
		vis[a[i]] = 1;
	}
	int d = (k - 1) / 2;
	int lft, rgt;
	int c = 0;

	rep(i, 1, n+1){
		if(!vis[i]){
			lft = i;
			++c;
			if(c == d)	break;
		}
	}

	c = 0;
	per(i, n, 0){
		if(!vis[i]){
			rgt = i;
			++c;
			if(c == d)	break;
		}
	}
	
	rep(i, lft+1, rgt){
		if(vis[i])	return 1;
	}

	return 0;
}

int main(){
	scanf("%d", &T);
	while(T--){
		scanf("%d %d %d", &n, &k, &m);
		rep(i, 0, m){
			scanf("%d", a+i);
		}
		puts(ok()?"YES":"NO");
	}
	return 0;
}
