#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int m;
    cin>>m;
    while(m--)
    {
    	int n,k,a[102],p=0;
        cin>>n>>k;
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>k)p++;
        }
        if(p==0)cout<<"YES"<<endl;
        else{
			sort(a,a+n);
			if(a[0]+a[1]<=k)cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
			p=0;
        }
    }
   return 0;
}
		  					 	  	  	  				 		   		