#include <bits/stdc++.h>
#define ll long long int
using namespace std;
void mainSolve()
{
int n;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; i++)
cin >> v[i];
ll sum = 0;
for (int x : v)
sum += x;
sum -= (n / 2);
if (sum % n == 0)
cout << "YES\n";
else
cout << "NO\n";
}
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t;
cin >> t;
while (t--)
{
mainSolve();
}
return 0;
}