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

#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vii vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define fastread ios_base::sync_with_stdio(0);cin.tie(NULL)
#define sum(x) accumulate(all(x),0LL)
#define what_is(x) cerr << #x << " = " << (x) << '\n'
#define pb push_back

int main()
{
    fastread;
    int t;
    cin >> t;
    while(t--) {
        int n;
        cin >> n;
        vii v(n);
        for (int i=0;i<n;++i) {
            cin >> v[i];
        }
        sort(all(v));
        vii a;
        for (int i=n-1;i>=0;i-=2) {
            a.pb(v[i]);
        }
        int k = n % 2;
        for (int i=0;i<n;i+=2) {
            a.pb(v[i]);
        }
        bool f = 0;
        for (int i=1;i<n-1;++i) {
            if (2 * a[i] > a[i + 1] + a[i - 1]) {
                f = 1;
                break;
            }
        }
        if (f)
            cout << "NO\n";
        else
            cout << "YES\n";
    }
    return 0;
}

