#include <bits/stdc++.h>

using namespace std;

typedef long long lli;
#define LF '\n'

const lli N=2001;

vector<lli> v;
vector<lli> used;

bool dp1[N][N];
bool dp2[N][N];

void solve()
{
    lli n;
    cin >> n;
    v.clear();
    v.resize(n+1);
    for (int i =1;i<=n;i++)cin >> v[i];
    sort(v.begin()+1,v.end());
    for (int i =0;i<=n;i++)for (int j =0;j<=n;j++)dp1[i][j]=0;
    for (int i =0;i<=n;i++)for (int j =0;j<=n;j++)dp2[i][j]=0;
    dp1[1][1]=1;
    vector<pair<lli,lli>> q;
    vector<pair<lli,lli>> q2;
    q.push_back({1,1});
    for (int i =2;i<n;i++){
        q2.clear();
        for (auto to : q){
            lli p1 = to.first;
            lli p2 = to.second;
            lli j = i-1;
            if (j==p1)j--;
            if (j==0)j=1;
            if (v[i+1]-v[i]>=v[i]-v[p1] && !dp2[i][p2]){
                dp2[i][p2]=1;
                q2.push_back({i,p2});
            }
            if (v[i+1]-v[j]>=v[j]-v[p2] && !dp2[j][p1]){
                dp2[j][p1]=1;
                q2.push_back({j,p1});
            }
        }
        swap(q,q2);
        /*for (int p1 = 1;p1<=i;p1++){
            for (int p2=1;p2<=i;p2++){
                if(!dp1[p1][p2])continue;
                lli j = i-1;
                if (j==p1)j--;
                if (j==0)j=1;
                if (v[i+1]-v[i]>=v[i]-v[p1])dp2[i][p2]=1;
                if (v[i+1]-v[j]>=v[j]-v[p2])dp2[j][p1]=1;
            }
        }*/
        for (int j =0;j<=n;j++)for (int g =0;g<=n;g++){dp1[j][g]=dp2[j][g];dp2[j][g]=0;}
    }
    for (int i =1;i<=n;i++){
        for (int j =1;j<=n;j++){
            if (dp1[i][j]){
                cout << "YES" << LF;
                return;
            }
        }
    }
    cout << "NO" << LF;
}

int main()
{
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    lli t;
    cin >> t;
    while(t--)solve();
}