#include using namespace std; int main() { int t; cin >> t; while (t--) { int n, m; cin >> n >> m; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } bool ok = true; for (int i = 0; i < n - 1; i++) { if (m <= a[i] + a[i + 1] && a[i] + a[i + 1] <= 2 * m) continue; ok = false; } cout << (ok ? "Yes" : "No") << endl; } return 0; }