#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

#define endl '\n'

pair<ll, ll> dp[2][2007][2007];

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 < 2; 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]};

        ll cur = 1;

        for(int i = 2; i < n; i++){
            cur = 1 - cur;

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

            for(int p1 = 0; p1 < i - 1; p1++){
                ll l = 0, r = 0;
                l = p1, r = i - 1;

                auto can = dp[1 - cur][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[cur][i][r].first = max(dp[cur][i][r].first, a[l]);
                    dp[cur][i][r].second = max(dp[cur][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[cur][l][i].second = max(dp[cur][l][i].second, a[r]);
                    dp[cur][l][i].first = max(dp[cur][l][i].first, can.first);
                }

                l = i - 1, r = p1;
                can = dp[1 - cur][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[cur][i][r].first = max(dp[cur][i][r].first, a[l]);
                    dp[cur][i][r].second = max(dp[cur][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[cur][l][i].second = max(dp[cur][l][i].second, a[r]);
                    dp[cur][l][i].first = max(dp[cur][l][i].first, can.first);
                }
            }
        }

        bool ans = false;

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

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

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

*/
