#include<bits/stdc++.h>

using namespace std;

#define ll long long
#define ff first
#define ss second
#define pb push_back

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    ll t, n;
    cin >> t;
    vector<ll> v;
    while(t--) {
        cin >> n;
        v.resize(n);
        for (int i=0; i<n; i++) {
            cin >> v[i];
        }
        sort(v.begin(), v.end());
        bool f = true, f2=false;
        do {
            f = true;
            for (int i=1; i<n-1; i++) {
                if (v[i-1]+v[i+1] < 2*v[i]) {
                    //cout << v[i-1] << " "<< v[i] << " " << v[i+1] << ".\n";
                    f = false;
                    break;
                }
            }
            if (f) {
                f2 = true;
                break;
            }
        }while (next_permutation(v.begin(), v.end()));
        if (f2) {
            cout << "YES\n";
        }else {
            cout << "NO\n";
        }
    }

}