#include <bits/stdc++.h>

#define ll long long

using namespace std;


int main(){
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    ll C;
    cin >> C;
    while(C--){
        ll n;
        cin >> n;
        vector<ll> k(n + 1, 0);
        for(ll i = 1 ; i <= n; i++){
            cin >> k[i];
        }
        sort(k.begin() + 1, k.begin() + n + 1, [](ll a, ll b){return a > b;});
        ll ans = 1;
        vector<ll> g(n + 2, 0);
        g[1] = k[1];
        g[n] = k[2];
        g[0] = k[1] ;
        g[n + 1] = k[2] ;
        ll l = 2, r = n - 1;
        for(ll i = 3; i <= n; i++){
            if(l == r){
                g[l] = k[i];
                break;
            }
            ll ld = g[l - 1] * 2 - g[l - 2];
            ll rd = g[r + 1] * 2 - g[r + 2];
            if(rd > ld){
                g[r] = k[i];
                r--;
            }else{
                g[l] = k[i]; 
                l++;
            }
        }
       
        for(ll i = 2; i < n; i++){
            if(g[i - 1] + g[i + 1] < g[i] * 2) ans = 0;
        }
        if(ans) cout << "YES" << endl;
        else cout << "NO" << endl;
    }

}

