#include #include #include using namespace std; using i64 = long long; using u64 = unsigned long long; using i32 = int; using u32 = unsigned int; #define rep(i,n) for(int i=0; i<(n); i++) bool testcase(){ int N; cin >> N; vector A(N); rep(i,N) cin >> A[i]; sort(A.begin(), A.end(), greater()); i64 sumA = 0; for(auto a : A) sumA += a; if(sumA % 3 != 0) return false; if(sumA < 3 * A[0]) return false; if(sumA * 2 < (A[0] + A[1]) * 3) return false; return true; } int main() { int T; cin >> T; while(T--) cout << (testcase() ? "Yes\n" : "No\n"); return 0; } struct ios_do_not_sync{ ios_do_not_sync(){ std::ios::sync_with_stdio(false); std::cin.tie(nullptr); } } ios_do_not_sync_instance;