using System.Linq; using System; public class Hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); var s = a.Sum() / (n - 1); for (int t = 0; t <= n; t++) { var total = 2 * t + 4 * (n - t); if (s == total) { Console.WriteLine("{0} {1}", t, n - t); break; } } } }