#include <bits/stdc++.h>
using namespace std;
vector<long long> len;
vector<long long> tide;
vector<long long> drown;
vector<vector<long long>> tests;
bool issafe(long long iter, long long jter) {
  if (jter == -1) return true;
  bool ret = !(drown[iter] < (tests[iter][jter] + tide[iter]));
  return ret;
}
long long movetime(long long iter, long long jter, long long time) {
  if (time < tide[iter]) {
    if (time + 1 + tests[iter][jter + 1] > drown[iter])
      return -1;
    else
      return time + 1;
  } else if (time == tide[iter])
    return -1;
  else {
    long long mod = 2 * tide[iter];
    if (tests[iter][jter + 1] > drown[iter]) return -1;
    long long ret =
        max(time + 1, 2 * tide[iter] + tests[iter][jter + 1] - drown[iter]);
    if (ret > tide[iter] * 2) return -1;
    if (ret == tide[iter] * 2) ret = 0;
    return ret;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  len.resize(n);
  tide.resize(n);
  drown.resize(n);
  tests.resize(n);
  for (size_t i = 0; i < n; i++) {
    cin >> len[i] >> tide[i] >> drown[i];
    tests[i].resize(len[i]);
    for (size_t j = 0; j < len[i]; j++) {
      cin >> tests[i][j];
    }
  }
  vector<bool> op(n);
  for (size_t i = 0; i < n; i++) {
    bool impossible = false;
    long long time = 0;
    for (long long j = -1; j < len[i]; j++) {
      if (issafe(i, j)) {
        if (j < len[i] - 1 && !issafe(i, j + 1)) {
          time = max(tide[i] + 1, 2 * tide[i] + tests[i][j + 1] - drown[i]);
          if (time == 2 * tide[i])
            time = 0;
          else if (tests[i][j + 1] > drown[i]) {
            impossible = true;
            goto label;
          }
        }
      } else if (j < len[i] - 1 && !issafe(i, j + 1)) {
        time = movetime(i, j, time);
        if (time == -1) {
          impossible = true;
          goto label;
        }
      }
    }
  label:
    op[i] = !impossible;
  }
  for (size_t i = 0; i < n; i++) {
    if (op[i])
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
