import java.util.*; import java.math.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for(int i = 0; i < n; i++) { a[i] = sc.nextInt(); } int min = a[0]; int max = a[0]; for(int i = 1; i < n; i++) { min = Math.min(min, a[i]); max = Math.max(max, a[i]); } if(min == max) { if(min == 2 * (n-1)) System.out.println(n+" 0"); else System.out.println("0 "+n); } else { int tsuru = 0; int kame = 0; for(int i = 0; i < n; i++) { if(a[i] == min) kame++; else tsuru++; } System.out.println(tsuru + " " + kame); } } }