#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define f first
#define s second
#define el endl
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define repa(i, a, n) for(int i = a; i <(n); ++i)
#define repd(i, n) for(int i = n; i >= 0; --i)
#define all(x) (x).begin(), (x).end()

void solve() {
    int n,d;
    cin>>n>>d;
    bool flag=true;
    vector<int>v(n);
    rep(i,n) {
        cin>>v[i];
        if(v[i] > d){
            flag=false;
        }
    }
    sort(all(v));
    
    if(v[0] + v[1] <=d || flag) {
        cout<<"yes"<<el;
    }
    else{
        cout<<"no"<<el;
    }
    
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  while(t--) {
    solve();
  }
  return 0;
}