#include<bits/stdc++.h>
#ifdef miaojie
  #define dbg(args...) do {cout << #args << " : "; err(args);} while (0)
void err() {std::cout << std::endl;}
template<typename T, typename...Args>
void err(T a, Args...args){std::cout << a << ' '; err(args...);}
#else
  #define dbg(...)
#endif
using namespace std;
using ll = long long;
const int maxn = 2e5 + 20;

int T, n, k, m;
int b[maxn], vis[maxn];
vector<int>ve;

int main() {
    scanf("%d", &T);
    while(T--) {
        scanf("%d%d%d", &n, &k, &m);
        ve.clear();
        for (int i = 1; i <= n; i++) {
            vis[i] = 0;
        }
        for (int i = 1; i <= m; i++) {
            scanf("%d", b + i);
            vis[b[i]] = 1;
        }
        
        for (int i = 1; i <= n; i++) {
            if(!vis[i]) {
                ve.push_back(i);
            }
        }   
        
        int siz = ve.size();
        if(siz % (k - 1) != 0) puts("NO");
        else {
            bool flag = 0;
            for (int i = (k - 2) / 2; i <= siz - (k - 2) / 2 - 2; i++) {
               // dbg(i);
                if(ve[i] != ve[i + 1] - 1) flag = 1;
            }
            
            if(flag) puts("YES");
            else puts("NO");           
        }
    }
    return 0;
} 