#include <bits/stdc++.h>

using namespace std;
#define ll long long;

struct mom
{
    int gf,gb,df,db;
};

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int t; cin >> t;
    int u;
    while(t--)
    {
        int n; cin >> n;
        u=0;
        int a[n+1];
        for(int i=1; i<=n; i++) cin >> a[i];
        sort(a+1,a+n+1);
        for(int i=3; i<=n; i++) {if(a[i]==a[i-2] && u==0) {cout << "NO" << endl;u=1;}}
        if(u==1) continue;

        int gf=2,gb=1,df=1,db=1,todo=0;
        stack <mom> st;
        while(max(gf,df)<n && u==0)
        {
            int m=max(gf,df)+1;
            if(todo==1){db=df; df=m; todo=0;}
                else if(a[gf]*2>a[gb]+a[m] && a[df]*2>a[db]+a[m]){if(st.size()>0){mom mm=st.top(); gf=mm.gf; gb=mm.gb; df=mm.df; db=mm.db; todo=1; st.pop();} else u=1;}
                    else if(a[gf]*2<=a[gb]+a[m] && a[df]*2<=a[db]+a[m]){mom mm={gf,gb,df,db}; st.push(mm); gb=gf; gf=m;}
                        else if(a[gf]*2<=a[gb]+a[m]){gb=gf; gf=m;}
                            else{db=df; df=m;}
        }
        if(u==0) cout << "YES"/* << ' ' << a[gf] << ' ' << a[gb] << ' ' << a[df] << ' ' << a[db]*/ << endl;
            else cout << "NO" << endl;

    }
}
