package main import . "fmt" import . "os" import bf "bufio" func main() { rd:=bf.NewReader(Stdin) var a,b,n,s int64 Fscan(rd,&n,&a) s+=a for ;n>1;n-- { Fscan(rd,&b) s+=b d:=b-a if d/n*n!=d{ Println("No") return } } if s/n*n!=s { Println("No") return } Println("Yes") }