#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <random>

using namespace std;

#define int long long

int inf = 100000000000000;

mt19937 rnd_(12);



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


    int times;
    cin >> times;

    while (times--) {

        int n;
        cin >> n;

        vector <int> a (n);

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

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

        bool f = false;

        for (int ms = 0 ; ms < (1 << n) ; ms++) {

            vector<int> b;
            for (int i = n - 1 ; i >= 1 ; i--) {
                if ((ms & (1 << i)) == 0)
                    b.push_back(a[i]);
            }

            b.push_back(a[0]);


            for (int i = 1 ; i < n ; i++) {
                if ((ms & (1 << i)) != 0)
                    b.push_back(a[i]);
            }
            bool f2 = true;
            for (int i = 1 ; i < n -  1 ; i++) {
                if (b[i]*2 > b[i - 1] + b[i+1])
                    f2 = false;
            }
            f = max(f , f2);
        }

        if (f == true)
            cout << "YES\n";
        else
            cout << "NO\n";

    }
}