#define _GLIBCXX_DEBUG //遅い可能性がある #include #include using namespace atcoder; using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(a) (a).begin(),(a).end() //lower_bound(ALL(a),x) using ll = long long; using P = pair; using VI = vector; using VVI = vector>; int INF = 100100100; const vector dx = {1, 0, -1, 0}; const vector dy = {0, 1, 0, -1}; int main() { int t; cin >> t; rep(i,t) { int n; cin >> n; VI A(n); rep(i,n) cin >> A[i]; ll s = 0; int mx = 0; rep(i,n) { s += A[i]; mx = max(mx, A[i]); } if (s%3 != 0) cout << "No" << endl; else { ll ns = s/3; if (mx <= ns) cout << "Yes" << endl; else cout << "No" << endl; } } return 0; }