#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
using namespace std;
struct node{ll first, second, third;};
void solve(){
    ll n;
    cin >> n;
    ll values[n];
    for(ll i = 0; i<n; i++) cin >> values[i];
    sort(values, values+n);
    do{
        bool trueornot = true;
        for(ll i = 1; i<n-1; i++){
            if(values[i-1]+values[i+1]<2*values[i]) trueornot=false;
        }
        if(trueornot){ cout << "YES\n"; return;}
    }while(next_permutation(values, values+n));
    cout << "NO\n";
}
int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    freopen("input.txt", "r", stdin);
    ll tests;
    cin >> tests;
    while(tests--) solve();
}