#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    int T;
    cin >> T;
    while(T--){
        ll n;
        cin >> n;
        ll a[n];
        for (int i=0; i<n; i++){
            cin >> a[i];
        }
        ll b[n];
        sort(a, a+n);
        int k=0;
        b[0]=a[n-1];
        b[n-1]=a[n-2];
        reverse(a,a+n);
        for (int i=n-1; i>1; i--){
            b[i-1]=a[i];
        }
        for (int i=1; i<n-1; i++){
            if (b[i-1]+b[i+1]<2*b[i]){
                cout << "NO" << endl;
                k=1;
                break;
            }
        }
        if (k==0){
            cout << "YES" << endl;
        }
        k=0;
    }
}