#include <bits/stdc++.h>
using std::cin;
int64_t T, N, K, L, t, d, a;
int main() {
  for (cin >> T; T--; puts(a ? "No " : "Yes "))
    for (a = t = 0, cin >> N >> K >> L; N--;
         d -= L, t *= d > -K, t = std::max(t, K + d), a |= d + t++ > K)
      cin >> d;
}
