using System; using System.Collections.Generic; using System.Linq; // https://yukicoder.me/problems/no/1586 class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("3"); WillReturn.Add("48 51 51"); } else if (InputPattern == "Input2") { WillReturn.Add("7"); WillReturn.Add("80 90 65 65 80 50 65"); } else if (InputPattern == "Input3") { WillReturn.Add("3"); WillReturn.Add("219 219 219"); } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); long[] AArr = InputList[1].Split(' ').Select(pX => long.Parse(pX)).ToArray(); long SumVal = AArr.Sum(); if (SumVal % AArr.Length > 0) { Console.WriteLine("No"); return; } Console.WriteLine("Yes"); } }