#include using namespace std; #define SZ(a) int(size(a)) #define ALL(a) begin(a), end(a) #define RALL(a) rbegin(a), rend(a) using ll = long long; using i128 = __int128_t; using ld = long double; using pii = pair; bool solve() { int n; cin >> n; vector a(n); for (auto &x : a) cin >> x; ll sum = accumulate(ALL(a), 0LL); if (sum % 3) return false; sort(RALL(a)); auto f = [&](ll d) { ll cnt = 0; for (int i = 2; i < n; i++) { cnt += max(a[i] - (a[1] - d - 1), 0LL); } return cnt >= d; }; ll l = -1, r = a[1]; while (l + 1 < r) { ll m = (l + r) / 2; if (f(m)) r = m; else l = m; } if (r == a[1]) return false; return 2 * (a[0] - r) <= sum - 3 * r; } int main() { ios::sync_with_stdio(0); cin.tie(0); int tcs = 1; cin >> tcs; for (int tc = 1; tc <= tcs; tc++) { cout << (solve() ? "Yes" : "No") << '\n'; } }