#include <iostream>
#include <vector>
#include <algorithm>
#include <deque>

using namespace std;
using ll = long long;

void handle_test() {
    int n;
    cin >> n;

    vector<int> arr(n);

    for (int i = 0; i < n; i++) {
        cin >> arr[i];
    }

    if (n <= 2) {
        cout << "YES\n";
        return;
    }

    sort(arr.begin(), arr.end());

    for (int mask = 0; mask < (1 << n); mask++) {
        deque<int> arr2{};

        for (int i = 0; i < n; i++) {
            if (mask & (1 << i)) {
                arr2.push_back(arr[i]);
            } else {
                arr2.push_front(arr[i]);
            }
        }

        bool good = true;

        for (auto iter = next(arr2.begin()); iter != prev(arr2.end()); iter++) {
            if (*prev(iter) + *next(iter) < 2 * (*iter)) {
                good = false;
                break;
            }
        }

        if (!good) {
            continue;
        }

        cout << "YES\n";
        return;
    }

    cout << "NO\n";
}

int main() {
#ifndef DEBUG
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
#endif

    int tests;
    cin >> tests;

    while (tests--) {
        handle_test();
    }

    return 0;
}
