#include <bits/stdc++.h>
int main() {
  int a[1001] = {0}, i, j, n, b, max, c = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &b);
    a[b]++;
  }
  max = a[0];
  for (i = 0; i < 1001; i++) {
    if (a[i] > max) max = a[i];
  }
  for (i = 0; i < 1001; i++) {
    if (a[i] != 0) c++;
  }
  printf("%d %d\n", max, c);
  return 0;
}
