#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;
        for(ll i = 3; i <= n - 2; i++){
            if(k[i - 2] + k[i + 2] - k[i] * 2 < 0) ans = 0;
        }
        if(k[n - 2] + k[n - 1] - k[n] * 2 < 0) ans = 0;
        if(k[n - 3] + k[n] - k[n - 1] * 2 < 0) ans = 0;
        if(ans) cout << "YES" << endl;
        else cout << "NO" << endl;
    }

}

