#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

#define endl '\n'

int main(){
    ll t;
    cin >> t;

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

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

        bool ans = false;

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

        for(int i = 0; i < (1ll << (n - 1)); i++){
            deque<ll> d;
            d.push_back(a[0]);

            for(int j = 1; j < n; j++){
                if((i >> (j - 1)) & 1)
                    d.push_front(a[j]);
                else
                    d.push_back(a[j]);
            }

            bool ok = true;

            for(int j = 1; j < n - 1; j++){
                if(2 * d[j] > d[j - 1] + d[j + 1]){
                    ok = false;
                    break;
                }
            }

            if(ok){
                ans = true;
                break;
            }
        }

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

    return 0;
}
/*
1
8
1 4 4 8 6 10 10 4

*/
