#include<bits/stdc++.h>
using namespace std;

int multipletest;
const int DEBUGGER = 0;

#define io                          ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL)
#define mset(a,v)                   memset(a,v,sizeof(a))
#define lp(i,a,n)                   for(int i=a;i<n;i++)
#define lpr(i,n,a)                  for(int i=n-1;i>=a;i--)
#define stlp(it,stl)                for(__typeof(stl.begin()) it=stl.begin();it!=stl.end();it++)
#define stlpr(it,stl)               for(__typeof(stl.rbegin()) it=stl.rbegin();it!=stl.rend();it++)
#define pb(x)                       push_back(x)
#define r(a)                        a.begin(),a.end()
#define rev(a)                      reverse(a)
#define II                          ({ int temp; cin>>temp; temp; })
#define LI                          ({ ll temp; cin>>temp; temp; })
#define SI                          ({ string temp; cin>>temp; temp; })
#define AI(a)                       ({ int n=sizeof(a)/sizeof(int); lp(i,0,n)a[i]=II; })
#define AL(a)                       ({ int n=sizeof(a)/sizeof(ll); lp(i,0,n)a[i]=LI; })
#define outa(a)                     cout<<a<<endl
#define VO(v)                       lp(i,0,v.size()){if(i)cout<<' '; cout<<v[i];} cout<<endl;
#define AO(a,n)                     lp(i,0,n){if(i)cout<<' '; cout<<a[i];} cout<<endl;
#define dbg(a)                      if(DEBUGGER)cout<<#a<<" = "<<a<<endl
#define cbit(n,p)                   (n&(1LL<<p))
#define sbit(n,p)                   (n|(1LL<<p))
#define tbit(n,p)                   (n^(1LL<<p))

#define MAX                         (int)(2e5)
#define MOD                         (int)(1e9+7)

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;

void solve(){
    ll n=II,k=II,h[n];
    AL(h);
    ll mn=h[0],mx=h[0];
    lp(i,1,n){
        mn-=(k-1);
        mx+=(k-1);
        mn=max(mn,h[i]);
        mx=min(mx,h[i]+k-1);
        if(mn>mx){
            outa("NO");return;
        }
    }
    if(mn==h[n-1])  outa("YES");
    else            outa("NO");
}

int main(void){
    io;
    multipletest=1;
    if(multipletest){
        int tc;
        cin>>tc;
        while(tc--)
            solve();
    }
    else
        solve();
    return 0;
}

