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

void solve() {
    int n;
    cin >> n;
    vector<int> v(n);
    for(int i=0; i<n; i++) {
        cin >> v[i];
    }
    sort(v.begin(), v.end());
    int c = v[0];
    v[0] = v[n-1];
    v[n-1] = v[n-2];
    v[n-2] = c;
    if(v[1]*2<=v[0]+v[2] && v[2]*2<=v[1]+v[3]) {
        cout <<"YES" << endl;
        return;
    }
     c = v[1];
    v[1] = v[2];
    v[2] = c;
    if(v[1]*2<=v[0]+v[2] && v[2]*2<=v[1]+v[3]) {
        cout <<"YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--) {
        solve();
    }
}
