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

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    for (int tt = 0; tt < t; tt++)
    {
        int n;
        cin>>n;
        int a[n + 5];
        for (int i = 1; i <= n; i++)
        {
            cin >> a[i];
        }
        sort(a + 1, a + n + 1);
        bool ok = false, ans = false;
        while (!ok)
        {
            ok = true;
            ans = true;
            for (int i = 2; i < n; i++)
            {
                if (a[i - 1] + a[i + 1] < a[i] * 2) ans = false;
                if (a[i] > a[i - 1]) ok = false;
            }
            if (a[n] > a[n - 1]) ok = false;
            if (ans) break;
            next_permutation(a + 1, a + n + 1);
        }
        if (ans) cout << "YES\n";
        else cout << "NO\n";
    }
}
