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