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 crane = 0; for(int i = 0; i < count; ++i){ if(max == num[i]){ crane++; } } System.out.println(crane + " " + (count-crane)); } catch (NumberFormatException e) { e.getStackTrace(); } catch (IOException e) { e.getStackTrace(); } catch (Exception e) { e.getStackTrace(); } } }