#pragma GCC optimize("O3,unroll-loops")
#include <bits/stdc++.h>
#define int long long
using namespace std;


int32_t 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);
        int d[16];
        d[0] = 1;
        for(int i = 1;i<16;i++){
            d[i] = d[i-1]*2;
        }
        int ans = 0;
        for(int k = 0;k<d[n] && ans == 0;k++){
            vector<int>v;
            int a1[n];
            for(int j = 0;j<n;j++){
                if(d[j]&k){
                    a1[j] = 1;
                }
                else{
                    a1[j] = 0;
                }
            }
            for(int i = n-1;i>=0;i--){
                if(a1[i] == 0){
                    v.push_back(a[i]);
                }
            }
            for(int i = 0;i<n;i++){
                if(a1[i] == 1){
                    v.push_back(a[i]);
                }
            }
            int c = 1;
            for(int i = 1;i<n-1;i++){
                if(v[i]*2 > v[i-1]+v[i+1]){
                    c = 0;
                }
            }
            ans = max(ans,c);
        }
        if(ans){
            cout<<"YES";
        }
        else{
            cout<<"NO";
        }
        cout<<endl;
    }
}
