package main import . "fmt" import . "os" import bf "bufio" func main() { rd:=bf.NewReader(Stdin) var n int Fscan(rd,&n) var sum int64 a:=make([]int64,n) for i:=range a { Fscan(rd,&a[i]) sum+=a[i] } if sum%int64(n)!= 0 { Println("No") return } avg:=sum/int64(n) var diff int64 for _,v:=range a { diff += avg-v } if diff==0 { Println("Yes") } else { Println("No") } }