#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;
using ll = long long;



struct DSU {
    int n;
    vector<int> p, h;

    DSU(int m) {
        n = m;
        p.assign(n + 1, -1);
        h.assign(n + 1, 1);

        for (int i = 0; i <= n; i++) {
            p[i] = i;
            h[i] = 1;
        }
    }

    int findParent(int node) {
        if (p[node] == node) {
            return node;
        }
        return p[node] = findParent(p[node]);
    }

    bool sameSet(int a, int b) {
        a = findParent(a);
        b = findParent(b);
        return a == b;
    }

    void unionSets(int a, int b) {
        a = findParent(a);
        b = findParent(b);
        if (a == b) return;
        if (h[a] < h[b]) {
            swap(a, b);
        }
        p[b] = a;
        h[a] += h[b];
    }
};

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

    int T;
    cin >> T;
    while (T--) {
        int n;
        cin >> n;

        vector<int> a(n);
        for (int i = 0; i < n; i++) {
            cin >> a[i];
        }

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

        int badd = -1;
        for (int i = 1; i < n - 1; i++) {
            if (2 * a[i] > a[i - 1] + a[i + 1]) {
                badd = i;
                break;
            }
        }
        if (badd == -1) {
            printf("YES\n");
        }
        else {
            bool ok = false;
            for (int bad = badd; bad <= badd + 1; bad++) {
                vector<int> b = a;
                b.erase(b.begin() + bad);
                bool here = true;
                for (int i = 1; i < n - 2; i++) {
                    if (2 * b[i] > b[i - 1] + b[i + 1]) {
                        here = false;
                        break;
                    }
                }
                if (here) ok = true;
            }

            printf(ok ? "YES\n" : "NO\n");
        }
        
    }



    


    
    
}