using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static void Main() { var t = NN; var res = new bool[t]; for (var u = 0; u < t; ++u) { var c = NList; var (n, m) = (c[0], c[1]); var a = NList; res[u] = Stair(n, m, a); } WriteLine(string.Join("\n", res.Select(f => f ? "Yes" : "No"))); } static bool Stair(int n, int m, int[] a) { var dp = new int[n + 1]; dp[0] = m; for (var i = 0; i < n; ++i) { if (dp[i + 1] < a[i]) { var mv = a[i] - dp[i + 1]; dp[i] -= mv; dp[i + 1] += mv; } if (i + 2 <= n && dp[i + 2] < a[i + 1]) { var mv = Math.Min(dp[i], a[i + 1] - dp[i + 2]); dp[i] -= mv; dp[i + 2] += mv; } if (dp[i] > 0) return false; } return true; } }