#include <bits/stdc++.h>

using namespace std;

/*
if(used[to]) low[v]=min(low[v],tin[to])
else{
    dfs(to,v);
    low[v]=min(low[v],low[to]);

    if(low[to]>tin[v]) rebro;
}*/
#define ll long long
const ll F=1e18,N=2e6;
ll n,a[N],b[N];



bool f1(ll c){
    multiset<ll> el;
    b[c-1]=a[2];

    for(ll i=3;i<=n;++i) el.insert(a[i]);
    el.insert(F);

    for(ll i=c-2,x;i>=1;--i){

        x=*el.lower_bound(2*b[i+1]-b[i+2]);
        if(x==F) return 0;

        b[i]=x;
        el.erase(el.find(x));
    }

    for(ll i=c+1,x;i<=n;++i){
        x=*el.lower_bound(2*b[i-1]-b[i-2]);

        if(x==F) return 0;

        b[i]=x;
        el.erase(el.find(x));
    }

    return 1;
}


bool f2(ll c){

    b[c+1]=a[2];
    multiset<ll> el;

    for(ll i=3;i<=n;++i) el.insert(a[i]);
    el.insert(F);

    for(ll i=c-1,x;i>=1;--i){

        x=*el.lower_bound(2*b[i+1]-b[i+2]);
        if(x==F) return 0;

        b[i]=x;
        el.erase(el.find(x));
    }

    for(ll i=c+2,x;i<=n;++i){
        x=*el.lower_bound(2*b[i-1]-b[i-2]);

        if(x==F) return 0;

        b[i]=x;
        el.erase(el.find(x));
    }

    return 1;
}

bool ser(ll c,bool ch){

    b[c]=a[1];


    if(ch && c==1) return 0;
    if(!ch && c==n) return 0;


     if(ch) return f1(c);
     else return f2(c);
}

string solve(){

    cin>>n;


    for(ll i=1;i<=n;++i) cin>>a[i];
    sort(a+1,a+1+n);


    for(ll i=1;i<=n;++i){
        if(ser(i,0)){
            //for(ll i=1;i<=n;++i) cout<<b[i]<<" ";cout<<"\n";
            return "YES\n";
        }

        if(ser(i,1)){
            //for(ll i=1;i<=n;++i) cout<<b[i]<<" ";cout<<i<<"\n";
            return "YES\n";
        }
    }

    return "NO\n";
}

int main()
{
    ll q=1;


    cin>>q;
    while(q--) cout<<solve();
}
