    #include <bits/stdc++.h>

    using namespace std;
    using ll = long long;

    int main() {
        ios_base::sync_with_stdio(false);
        cin.tie(NULL); cout.tie(NULL);
        ll t;
        cin >> t;
        while (t--) {
            ll n;
            cin >> n;
            vector<ll> a(n);
            for (ll i = 0; i < n; i++) {
                cin >> a[i];
            }
            sort(a.begin(), a.end());
            for (ll i = n - 3; i > 1; i--) {
                if (a[i + 2] + a[i - 2] < a[i] * 2) {
                    cout << "NO\n";
                    break;
                }
            }
            if (a[0] + a[3] < a[1] * 2) {
                cout << "NO\n";
                continue;
            }
            if (a[1] + a[2] < a[0] * 2) {
                cout << "NO\n";
                continue;
            }
            cout << "YES\n";
        }
    }