#include <bits/stdc++.h>

using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    long long t;
    cin>>t;
    while(t--){
        long long n;
        cin>>n;
        long long a[n];
        //multiset<long long> st;
        for(long long i=0;i<n;i++){
            cin>>a[i];;
        }
        sort(a, a+n);
        if((a[3]+a[0]>=2*a[2] && a[2]+a[1]>=2*a[0])||((a[3]+a[1]>=2*a[2] && a[2]+a[0]>=2*a[1]))){
            cout<<"YES\n";
        }
        else cout<<"NO\n";
    }
    return 0;
}

