#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll,ll> P; typedef vector<ll> VI; typedef vector<VI> VVI; #define REP(i,n) for(ll i=0;i<(n);i++) #define ALL(v) v.begin(),v.end() template<typename T> bool chmax(T &x, const T &y) {return (x<y)?(x=y,true):false;}; template<typename T> bool chmin(T &x, const T &y) {return (x>y)?(x=y,true):false;}; constexpr ll MOD=998244353; constexpr ll INF=2e18; void solve(){ ll n, m; cin >> n >> m; VI a(n+2,0); REP(i,n) cin >> a[i]; VI b(n+2,0); b[0]=m; REP(i,n){ int x=a[i]-b[i+1]; int y=a[i+1]-b[i+2]; if(x<0||y<0){ cout << "No" << endl; return; } b[i+1]+=x; b[i+2]+=b[i]-x; if(a[i]!=b[i+1]||x>b[i]){ cout << "No" << endl; return; } } cout << "Yes" << endl; } int main(){ int t; cin >> t; while(t--) solve(); return 0; }