res = [] for _ in range(int(input())) : input() N = int(input()) res.append("NO" if sum([int(input()) for _ in range(N)]) % N else "YES") print("\n".join(map(str, res)))