program asola;
{ NOTE: it is recommended to use this even if you don't understand the following code }

const
    MAXN = 100000;

var
    K, L, N, T, i, test : LongInt;
    X                   : Array[0..MAXN-1] of LongInt;
    ans                 : AnsiString;
    rimanespazio : boolean;
begin
{
    uncomment the two following lines if you want to read/write from files
    assign(input,  'input.txt');  reset(input);
    assign(output, 'output.txt'); rewrite(output);
}

    ReadLn(T);
    for test:=1 to T do begin
        ReadLn(N, L, K);

        for i:=0 to N-1 do
            Read(X[i]);
        ReadLn();

        ans := '';

        { INSERT YOUR CODE HERE }
        if (X[0]>=K) or (L-(X[N-1]+K)>=K) then ans:='YES'
                   else
                      begin
                        rimanespazio:=false; i:=1;
                        while (rimanespazio=false) and (i<N) do
                              begin
                               if X[i]-(X[i-1]+K)>=K then begin rimanespazio:=true; continue; end;
                               i:=i+1;
                              end; 
                        if rimanespazio=true then ans:='YES'
                                             else ans:='NO'  ;
                      end;                       
        WriteLn(ans);
    end;

end.
