#include<iostream>
#include<vector>
#include <array>
using namespace std;
const int maxn = 3e5 + 10;
const long long mod = 1e9 + 7;
void run_case() {
    int N, K;
    bool ok = true;
    cin >> N >> K;
    vector<int> H(N);

    for (auto& h : H)
        cin >> h;

    array<int, 2> range = { H[0], H[0]};

    for (int i = 1; i < N; i++) {
        range[0] = max(range[0] - (K - 1), H[i]);
        range[1] = min(range[1] + K - 1, H[i] + K-1);

        if (range[0] > range[1])ok = false;
        if (i == N - 1 && range[0] != H[i]) ok = false;
        
    }
    cout << (ok ? "yes" : "no") << endl;

    
}
int main() {
    int t;
    cin >> t;
    while (t--) {
        run_case();
    }
    
}

      