/* -*- coding: utf-8 -*- * * 1823.cc: No.1823 Tricolor Dango - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 200000; /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ /* main */ int main() { int tn; scanf("%d", &tn); while (tn--) { int n; scanf("%d", &n); ll sum = 0; int maxa = 0; for (int i = 0; i < n; i++) { int ai; scanf("%d", &ai); sum += ai; maxa = max(maxa, ai); } if (sum % 3 == 0 && sum / 3 >= maxa) puts("Yes"); else puts("No"); } return 0; }