t=int(input()) for _ in range(t): n=int(input()) a=list(map(int,input().split())) if sum(a)%3!=0: print('No') else: if sum(a)//3