program asola;

const
    MAXN = 100000;

var
    K, L, N, T, i, test : LongInt;
    X                   : Array[0..MAXN-1] of LongInt;
    ans                 : AnsiString;
    rimanespazio : boolean;
begin
    (*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);
        if N<>0 then begin
             for i:=0 to N-1 do
             Read(X[i]);
        end;
        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.