package main import . "fmt" import . "os" import bf "bufio" func main() { rd:=bf.NewReader(Stdin) var t int Fscan(rd,&t) for ;t>0;t-- { var n int Fscan(rd,&n) a:=make([]int64,n) s:=int64(0) for i:=range a { Fscan(rd,&a[i]) s+=a[i] } ok:=s%3==0 for _,v:=range a { ok=ok&&v<=s/3 } if ok { Println("Yes") } else { Println("No") } } }