#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,d;
        cin>>n>>d;
        int arr[100];
        for(int i = 0 ;i < n;i++)
        {
            cin>>arr[i];
        }
        int flag = 1,index = n-1,pos = 0;
        sort(arr,arr+n);
        if(arr[index] > d)
            {
                if(arr[0] + arr[1] <= d)
                {
                	index--;
                }
                else
                {
                	flag = 0;
                }
            }
            
        if(flag)
        {
        	cout<<"Yes"<<" "<<endl;
        }
    	else
    	{
    		cout<<"NO"<<" "<<endl;
    	}
    }
}