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

void solve() {
    int n;
    cin>>n;
    vector<ll> a(n);
    for (auto& el : a) {
        cin>>el;
    }
    sort(a.begin(), a.end());
    for (int z = 0; z < 2; z++) {
        swap(a[0], a[1]);
        swap(a[0], a[2]);
        bool cn = true;
        for (int i = 1; i < n - 1; i++) {
            if (!((a[i - 1] + a[i + 1]) >= a[i] * 2)) {
                cn = false;
                break;
            }
        }
        if (cn) cout << "YES" << endl;
        swap(a[0], a[2]);
    }
    cout << "NO" << endl;
}

int main() {
    // freopen("input.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int t;
    cin>>t;
    while (t) {
        solve();
        t--;
    }
}
