import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try { int count = Integer.parseInt(buff.readLine()); String[] box = buff.readLine().split(" "); int[] num = new int[count]; int max = 0; for (int i = 0; i < count; ++i) { num[i] = Integer.parseInt(box[i]); if (max < num[i]) { max = num[i]; } } int check = 0; boolean flag = true; for (int i = 0; i < count; ++i) { if (max == num[i]) { check++; } else { flag = false; } } if (flag && count * 2 - 2 != max) { System.out.println((count - check) + " " + check); } else { System.out.println(check + " " + (count - check)); } } catch (NumberFormatException e) { e.getStackTrace(); } catch (IOException e) { e.getStackTrace(); } catch (Exception e) { e.getStackTrace(); } } }