#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;

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

        sort(a, a + n, greater<int>());
        bool ans = false;
        int b[n];
        for (int j = 0; j < (1 << n); j++) {
            int l = 0, r = n - 1;
            for (int i = 0; i < n; i++) {
                if (j & (1 << i)) {
                    b[l] = a[i];
                    l++;
                }
                else {
                    b[r] = a[i];
                    r--;
                }
            }
            bool here = true;
            for (int i = 1; i < n - 1; i++) {
                if (2 * b[i] > b[i - 1] + b[i + 1]) {
                    here = false;
                }
            }
            if (here) {
                ans = true;
                break;
            }
        }

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



    


    
    
}