#include <bits/stdc++.h>
using namespace std;

#define int long long
#define mp make_pair

const int mxN = 7e5;
int t, n;

int32_t main() {
        ios_base::sync_with_stdio(0);
        cin.tie(0);

        cin >> t;
        while(t--) {
                cin >> n;
                vector<int> a(n);
                bool ok = 0;
                for(int i = 0; i < n; ++i) cin >> a[i];
                sort(a.begin(), a.end());
                do {
                    //    for(int i = 0; i < n; ++i) cout << a[i] << " ";
                    //    cout << endl;
                       bool f = 0;
                       for(int i = 1; i < n - 1; ++i) {
                                if(a[i - 1] + a[ i + 1] < 2 * a[i]) {
                                        f = 1;
                                        break;
                                }
                       }
                       if(!f) {
                                ok = 1;
                                cout << "YES" << endl;
                                break;
                       }
                } while(next_permutation(a.begin(), a.end()) && !ok);
                if(!ok) {
                        cout << "NO" << endl;
                }
        }
}
