import java.util.Arrays; import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int[] n = new int[sc.nextInt()]; int turu = 0, kame = 0; for(int i = 0; i < n.length; i++) n[i] = sc.nextInt(); Arrays.sort(n); if(n[0] != n[1] || n[n.length - 1] != n[n.length - 2]){ if((n[0] + n[1]) / 2 == 2 || (n[n.length - 1] + n[n.length - 2]) / 2 == 2){ kame = n.length - 1; turu = 1; } else{ turu = n.length - 1; kame = 1; } } else{ if(n[0] / (n.length - 1) == 2)turu = n.length; else kame = n.length; } System.out.println(turu + " " + kame); sc.close(); } }