#include <bits/stdc++.h>
#define endl '\n'
using namespace std;

typedef long long ll;
ll a[700007],b[700007],n;

int main() {

    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

    ll t;
    cin>>t;
    while(t--) {
        cin>>n;

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

        int j1=1, j2=n;

        for(int i=n;i>=1;i--)
            if(i%2==1) { b[j1]=a[i]; j1++;}
            else { b[j2]=a[i]; j2--;}

        bool fl=0;
        for(int i=2;i<n;i++) if(b[i]*2>b[i-1]+b[i+1]) {fl=1; break;}
        if(!fl) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }

    return 0;
}
