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

const int N=2e5+5;

int T,a[N],n,m,k,mark;

int main() {
  scanf("%d",&T);
  while(T--){
    memset(a,0,sizeof a);
    scanf("%d%d%d",&n,&k,&m);
    for(int i=0;i<m;++i){
      int x;
      scanf("%d",&x);
      a[x]=1;
    }
    //cout << "\nn = " << n << " k = " << k << " m = " << m << endl;for(int i=1;i<=n;++i)cout << a[i] << ' ';cout << endl;
    if((n-m)%(k-1)){
      puts("NO");
      continue;
    }
    int j=1,i=1;
    int h=k/2;
    while(h--){
      while(a[i])++i;
      while(j<=i||!a[j]&&j<=n)++j;
      ++i;
    }
    mark=j;
    j=n;i=n;
    h=k/2;
    while(h--){
      while(a[i])--i;
      while(j>=i||!a[j]&&j)--j;
      --i;
    }
    if(j<mark){
      puts("NO");
      continue;
    }
    puts("YES");
  }
}
