import java.util.*; public class Exercise115{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; boolean f = false; int bigger = 0; for(int i = 0; i < n; i++){ a[i] = sc.nextInt(); bigger = Math.max(bigger, a[i]); if(i > 0 && a[i] != a[i - 1]){ f = true; } } int t = 0; int k = 0; if(f){ for(int i = 0; i < n; i++){ if(a[i] == bigger){ t++; }else{ k++; } } }else{ if(a[0] / (n - 1) == 2){ t = n; }else{ k = n; } } System.out.println(t + " " + k); } }