/*
author: LaurenMayberry
*/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;


int n,k;
int A[200005];
int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int t; cin>>t;
    while(t--) {
        cin>>n>>k;
        for(int i=1;i<=n;i++) cin>>A[i];
        int a=A[1], b=A[1];
        int flag = 0;
        for(int i=2;i<n;i++) {
            a -= k-1;
            b += k-1;
            if(b < A[i] || A[i]+k-1 < a) {
                flag = 1;
            }
            a = max(a, A[i]);
            b = min(b, A[i]+k-1);
        }
        if(flag == 1) {
            cout<<"no\n";
            continue;
        }
        a -= k-1;
        b += k-1;
        if(a <= A[n] && A[n] <= b){
            cout<<"yes\n";
            continue;
        }
        cout<<"no\n";
    }
    return 0;
}
