// No.1586 Equal Array package main import ( "bufio" "fmt" "os" "strconv" "strings" ) // func makeDummy(dummy_txt string, n int) { // rand.Seed(time.Now().UnixNano()) // o, _ := os.Create(dummy_txt) // defer o.Close() // fmt.Fprintln(o, n) // for i := 0; i < n; i++ { // if i != 0 { // fmt.Fprint(o, " ") // } // //fmt.Fprint(o, 1_000_000_000) // fmt.Fprint(o, 1+rand.Int()%1_000_000_000) // } // fmt.Fprintln(o) // } func main() { // makeDummy("dummy.txt", 100000) // os.Stdin, _ = os.Open("dummy.txt") // now := time.Now() // defer func() { fmt.Println(time.Since(now)) }() sc := bufio.NewScanner(os.Stdin) sc.Buffer(make([]byte, 100000*11+2), 100000*11+2) sc.Scan() N, _ := strconv.Atoi(sc.Text()) sc.Scan() ss := strings.Fields(sc.Text()) suma := 0 for _, s := range ss { a, _ := strconv.Atoi(s) suma += a } if suma%N == 0 { fmt.Println("Yes") } else { fmt.Println("No") } }