#include <bits/stdc++.h>
using namespace std;
int msb(long long x) {
  union {
    double a;
    int32_t b[2];
  };
  a = x;
  return (b[1] >> 20) - 1023;
}
void sol() {
  long long n, m, a = 0, c, d, t = 0;
  cin >> n >> m >> c;
  for (int i = (0); i < (n); i++) {
    cin >> d;
    d -= c;
    t *= d > -m;
    t = max(t, m + d);
    a |= d + t++ > m;
  }
  puts(a ? "No " : "Yes ");
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) sol();
}
