#include <algorithm>
#include <iostream>
#include <list>
#include <vector>
#include <deque>
using namespace std;

int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int T;
    cin >> T;
    vector<bool> ans (T);
    for(int t=0; t<T; t++) {
        int n;
        cin >> n;
        vector<int> q (n);
        for(int i = 0; i < n; i++)
            cin >> q[i];
        sort(q.begin(), q.end());

        bool bl = true;
        list<int> q2;
        q2.push_back(q[0]);
        q2.push_back(q[1]);
        for (int i = 2; i < n; i++) {
            if (q2.front() > q2.back()) {
                q2.push_back(q[i]);
            } else {
                q2.push_front(q[i]);
            }
        }
        vector<int> q3 (q2.begin(), q2.end());
        for (int i = 1; i < q2.size() - 1; i++) {
            if (q3[i]*2 > q3[i - 1] + q3[i+1]) {
                bl = false;
                break;
            }
        }

        // for (int i : q3)
        //     cout << i << " ";
        // cout << endl;

        ans[t] = bl;
    }

    for (bool b : ans) {
        if (b)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }

    return 0;
}
