using System; using System.Linq; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); a.Sort(); int turu = 0; int kame = 0; if (a[0] == a[n - 1]) { if (a[0] / (n - 1) == 2) turu = n; else kame = n; } else { kame = a.IndexOf(a[n - 1]); turu = n - kame; } Console.WriteLine(turu + " " + kame); } }