#include<bits/stdc++.h>
#define line printf("------\n")
#define endl "\n"
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
const int N = 1e6 + 10, M = 1e9 + 10;
int ix[4] = {1,-1,0,0}, iy[4] = {0,0,1,-1};
int a, b;
int main(){
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
int x, y;
cin >> a;
while(a --){
cin >> x >> y;
vector<int> v(x);
int flag = 1;
for(int i = 0; i < x; i++){
cin >> v[i];
}
for(int i = 1; i < x; i++){
if(v[i - 1] > v[i]){
if(v[i - 1] - v[i] <= y) v[i] = v[i - 1];
else {
flag = 0;
break;
}
} else {
if(v[i] - v[i - 1] > y){
v[i] -= y;
} else {
v[i] = v[i - 1];
}
}
}
cout << (flag ? "Yes" : "No") << endl;
}
return 0;
}