using System; using System.Linq; using System.Collections.Generic; using System.Text; namespace Main { class Program { static void Main(string[] args) { int N = ReadInt1(); int[] Ary = ReadIntAry(); int sum = 0; for (int i = 0; i < N; i++) { sum += Ary[i]; } Console.WriteLine((sum % N == 0) ? "Yes" : "No"); } public static int Lcm(int a, int b) { return a * b / Gcd(a, b); } public static int Gcd(int a, int b) { if (a < b) return Gcd(b, a); while (b != 0) { var remainder = a % b; a = b; b = remainder; } return a; } static void AddValue2Dic(ref Dictionary dic, string key, int val) { if (!dic.ContainsKey(key)) dic.Add(key, val); else dic[key] += val; } static void AddValue2Dic(ref Dictionary dic, int key, int val) { if (!dic.ContainsKey(key)) dic.Add(key, val); else dic[key] += val; } static long[] ReadLongAry() => Array.ConvertAll(Console.ReadLine().Split(), long.Parse); static long ReadLong1() { return long.Parse(Console.ReadLine()); } static (long, long) ReadLong2() { var x = ReadLongAry(); return (x[0], x[1]); } static (long, long, long) ReadLong3() { var x = ReadLongAry(); return (x[0], x[1], x[2]); } static int[] ReadIntAry() => Array.ConvertAll(Console.ReadLine().Split(), int.Parse); static int ReadInt1() { return int.Parse(Console.ReadLine()); } static (int, int) ReadInt2() { var x = ReadIntAry(); return (x[0], x[1]); } static (int, int, int) ReadInt3() { var x = ReadIntAry(); return (x[0], x[1], x[2]); } static string[] ReadStrAry() => Console.ReadLine().Split(); static string ReadStr1() { return Console.ReadLine(); } static (string, string) ReadStr2() { var x = ReadStrAry(); return (x[0], x[1]); } static (string, string, string) ReadStr3() { var x = ReadStrAry(); return (x[0], x[1], x[2]); } } public static class Combination { public static IEnumerable Enumerate(IEnumerable items, int k, bool withRepetition) { if (k == 1) { foreach (var item in items) yield return new T[] { item }; yield break; } foreach (var item in items) { var leftside = new T[] { item }; var unused = withRepetition ? items : items.SkipWhile(e => !e.Equals(item)).Skip(1).ToList(); foreach (var rightside in Enumerate(unused, k - 1, withRepetition)) { yield return leftside.Concat(rightside).ToArray(); } } } } }