#include <iostream>
#include <vector>
#include <algorithm>
#define ll long long
#define pii std::pair<int, int>
void solve() {
    int n;
    std::cin >> n;
    std::vector<int> a(n);
    for (int i = 0; i < n; ++i) {
        std::cin >> a[i];
    }
    std::sort(a.begin(), a.end());
     if (n == 3) {
        std::cout << ((a[0] * 2 <= (a[1] + a[2])) ? "YES" : "NO") << "\n";
        return;
    }
    bool ans = true;
    ans &= (2 * a[0] <= (a[1] + a[2]));
    ans &= (2 * a[1] <= (a[0] + a[3]));
    std::cout << (ans ? "YES" : "NO") << '\n';
}
int main() {
    std::cin.tie(nullptr)->sync_with_stdio(false);
    int t;
    std::cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}