#include <stdio.h>
int main()
{
int t, n;
long long int candy;
scanf("%d", &t);
for (int i = 0; i < t; i++) {
long long int total = 0;
scanf("%d", &n);
for (int j = 0; j < n; j++) {
scanf("%lld", &candy);
total += candy;
total = total % n;
}
if (total == 0) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
return 0;
}