#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define lowbit(x) (x & -x)
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0), eps = 1e-6;
const int N = 2e5 + 10;
int pre[N], suf[N];
bool vis[N];

bool judge(int a, int b, int k) {
    if (!a || !b) return false;
    // if (a % k == 0 && b % k == 0) return true;
    // if (a % k == k / 2 && b % k == k / 2) return true;
    if (a >= k / 2 && b >= k / 2) return true;
    return false;
}

int main(int argc, char const *argv[]) {
    int n, k, m, t, x;
    cin >> t;
    while (t--) {
        scanf("%d %d %d", &n, &k, &m);
        k = k - 1;
        for (int i = 1; i <= n; i++) vis[i] = false;
        for (int i = 1; i <= m; i++) {
            scanf("%d", &x);
            vis[x] = true;
        }
        bool flag = false;
        if ((n - m) % k == 0) {
            suf[n + 1] = pre[0] = 0;
            for (int i = 1; i <= n; i++) pre[i] = pre[i - 1] + !vis[i];
            for (int i = n; i; i--) suf[i] = suf[i + 1] + !vis[i];
            for (int i = 1; i <= n; i++) {
                if (!vis[i]) continue;
                if (judge(pre[i], suf[i], k)) {
                    flag = true;
                    break;
                }
            }
        }
        puts(flag ? "YES" : "NO");
    }
    return 0;
}
  			   	     		 						 		 	