#pragma GCC optimize("O3,unroll-loops")
#include <bits/stdc++.h>
#define int long long
using namespace std;


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

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