#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

#define endl '\n'

bool check(vector<ll> d, ll n){
    for(int j = 1; j < n - 1; j++){
        if(2 * d[j] > d[j - 1] + d[j + 1]){
            return false;
        }
    }

    return true;
}

int main(){
    ll t;
    cin >> t;

    while(t--){
        ll n;
        cin >> n;

        vector<ll> a(n);
        for(auto &i: a)
            cin >> i;

        sort(a.begin(), a.end());

        bool ans = check(a, n);

        for(int i = 1; i < n - 1; i++){
            if(2 * a[i] > a[i - 1] + a[i + 1]){
                vector<ll> d = {a[i]};
                for(int j = 0; j < n; j++)
                    if(i != j)
                        d.push_back(a[j]);

                if(check(d, n)){
                    ans = true;
                    break;
                }

                d = {a[i + 1]};

                for(int j = 0; j < n; j++)
                    if(i + 1 != j)
                        d.push_back(j);

                if(check(d, n)){
                    ans = true;
                    break;
                }
            }
        }

        cout << (ans ? "YES" : "NO") << endl;
    }

    return 0;
}
/*
1
8
1 4 4 8 6 10 10 4

*/
