import java.util.Scanner; import static java.lang.Math.max; import static java.lang.Math.min; public class TaskL { public static void main(String[] args) { Scanner cin = new Scanner(System.in); int n = cin.nextInt(); int a[] = new int[n]; int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; for (int i = 0; i < n; ++i) { a[i] = cin.nextInt(); min = min(min, a[i]); max = max(max, a[i]); } if (max == min) { int one = max / (n - 1); if (one == 2) { System.out.println(n + " " + 0); } else { System.out.println(0 + " " + n); } } else { int t = 0, k = 0; for (int i = 0; i < n; ++i) { if (a[i] == min) k++; else t++; } System.out.println(t + " " + k); } } }