You have an array a_1, a_2, ..., a_n. All a_i are positive integers.

In one step you can choose three distinct indices i, j, and k (i ≠ j; i ≠ k; j ≠ k) and assign the sum of a_j and a_k to a_i, i. e. make a_i = a_j + a_k.

Can you make all a_i lower or equal to d using the operation above any number of times (possibly, zero)?

Input

The first line contains a single integer t (1 ≤ t ≤ 2000) — the number of test cases.

The first line of each test case contains two integers n and d (3 ≤ n ≤ 100; 1 ≤ d ≤ 100) — the number of elements in the array a and the value d.

The second line contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 100) — the array a.

Output

For each test case, print YES, if it's possible to make all elements a_i less or equal than d using the operation above. Otherwise, print NO.

You may print each letter in any case (for example, YES, Yes, yes, yEs will all be recognized as positive answer).

Example

Input


3
5 3
2 3 2 5 4
3 4
2 4 4
5 4
2 1 5 3 6


Output


NO
YES
YES

Note

In the first test case, we can prove that we can't make all a_i ≤ 3.

In the second test case, all a_i are already less or equal than d = 4.

In the third test case, we can, for example, choose i = 5, j = 1, k = 2 and make a_5 = a_1 + a_2 = 2 + 1 = 3. Array a will become [2, 1, 5, 3, 3].

After that we can make a_3 = a_5 + a_2 = 3 + 1 = 4. Array will become [2, 1, 4, 3, 3] and all elements are less or equal than d = 4.
//NAME-DEEPESH BHATT
//Institute-IIT Dhanbad
//MOTTO-THINK FIRST,CODE LATER

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll MOD = 1E9+7 ;
/*#define endl '\n'*/

//Check for signed int overflow
// use __builtin_popcountll(num) to calculate no.of setbits in num
//__builtin_clz() -> leading zeroes
//bitset<365>->bin no. with 365 bits avail.
// cout<<bitset<8>(x) prints x after converting it into bits
//s.lower_bound() works in O(logn) whereas lower_bound(s.begin(),s.end(),x) works in O(n)

//Euclid's Algo
ll gcd(ll a,ll b)
{
    if(b==0)
        return a;
    else
        return gcd(b,a%b);
}
//Extended Euclid's Algo
ll gcd_ex(ll a,ll b,ll&x,ll&y){
    if(b==0){
        x=1;
        y=0;
        return a;
    }
    ll x1,y1;
    ll g=gcd_ex(b,a%b,x1,y1);
    x=y1;
    y=x1-y1*(a/b);
    return g;
}
//Multiplicative Modulo Inv
ll multi_mod_inv(ll a,ll m){
    ll x,y;
    ll g=gcd_ex(a,m,x,y);
    if(g!=1){
        return -1;
    }
    x=(x%m+m)%m;
    return x;
}
//Mod division
ll mod_div(ll a,ll b,ll m){
    //(a/b)mod m?
    if(multi_mod_inv(b,m)!=-1){
        return (a%m*multi_mod_inv(b,m)%m)%m;
    }
    else{
        return -1;
    }
}
//lcm
ll lcm(ll a ,ll b)
{
    return a/gcd(a,b)*b;
}
//Binary Exponentiation
ll power(ll a,ll n){
    if (n == 0)
        return 1;
    ll p = power(a, n / 2);
    p = (p * p)%MOD;
    if (n % 2)
        return (p * a)%MOD;
    else
        return p%MOD;
}
/*//Euler Totient Function
ll phi[1000001]={0};
void euler_totient(ll n){
    for(ll i=0;i<=n;i++){
        phi[i]=i;
    }
    phi[1]=1;
    for(ll i=2;i<=n;i++){
        if(i==phi[i]){
            phi[i]=i-1;//For a prime number phi(p)=p-1
            for(ll j=2*i;j<=n;j+=i){
                phi[j]=phi[j]*(i-1)/i;
            }
        }
    }
}*/

/*void sieve(vector<ll>&is_prime){
    is_prime[0]=is_prime[1]=0;
    for(ll i=2;i*i<=4*1000000;i++){
        if(is_prime[i]){
            for(ll j=i*i;j<=4*1000000;j+=i){
                is_prime[j]=0;
            }
        }
    }
}*/
/*ll nCr(ll n,ll r){
    //By property that for every k consecutive numbers
    //the product is div by k!
    ll ans=1;
    //O(r)-Time complexity
    for(ll i=0;i<r;i++){
        ans*=(n-i);
        ans/=(i+1);//ans%(i+1)=0 for all i;
    }
    return ans;
}*/

int32_t main()
{
    /*freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);*/
    ios_base::sync_with_stdio(false);    //for fast I/O operation
    cin.tie(nullptr);
    ll test=1;
    cin>>test;
    while(test--){
        ll n,d;
        cin>>n>>d;
        vector<ll>a(n);
        for(ll i=0;i<n;i++){
            cin>>a[i];
        }
        sort(a.begin(),a.end());
        bool flag=true;
        for(auto x:a){
            if(x>d){
                flag=false;
            }
        }
        if(flag){
            cout<<"YES"<<endl;
        }
        else{
            ll A=a[0];
            ll B=a[1];
            if(A+B<=d){
                cout<<"YES"<<endl;
            }
            else{
                cout<<"NO"<<endl;
            }
        }
    }
    return 0;
}