#include <bits/stdc++.h>

using namespace std;
typedef int ll;

#define endl '\n'

pair<ll, ll> dp[407][407][407];

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

    ll t;
    cin >> t;

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

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

        for(int i = 0; i < n; i++)
            for(int j = 0; j < n; j++)
                for(int k = 0; k < n; k++)
                    dp[i][j][k] = {-1, -1};

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

        dp[1][0][1] = {a[1], a[0]};
        dp[1][1][0] = {a[0], a[1]};

        for(int i = 2; i < n; i++){
            for(int l = 0; l < i; l++){
                for(int r = 0; r < i; r++){
                    if(l == r)
                        continue;

                    // this is the state to recount dp[i][...][...] from.

                    // put on left:
                    auto can = dp[i - 1][l][r];

                    // cout << i << ' '<< l << ' ' << r << ' ' << can.first << ' ' << can.second << endl;
                    if(can.first != -1 && 2 * a[l] <= can.first + a[i]){
                        // cout << "tran " << i - 1 << ' ' << l << ' ' << r << "   " << i << ' ' << i << ' ' << r << endl;
                        dp[i][i][r].first = max(dp[i][i][r].first, a[l]);
                        dp[i][i][r].second = max(dp[i][i][r].second, can.second);
                    }

                    // put on right:
                    if(can.second != -1 && 2 * a[r] <= can.second + a[i]){
                        // cout << "tran2 " << i - 1 << ' ' << l << ' ' << r << "   " << i << ' ' << l << ' ' << i << endl;
                        dp[i][l][i].second = max(dp[i][l][i].second, a[r]);
                        dp[i][l][i].first = max(dp[i][l][i].first, can.first);
                    }
                }
            }
        }

        bool ans = false;

        for(int possible = 0; possible < n - 1; possible++)
            if(dp[n - 1][possible][n - 1].second != -1)
                ans = true;

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

    return 0;
}
/*
1
4
5 4 1 4

*/
