#include <bits/stdc++.h>
int main() {
  int i, N, j, l[1001], max = 1, count = 1, check = 0, V = 0;
  scanf("%d", &N);
  for (i = 1; i <= N; i++) scanf("%d", &l[i]);
  for (i = 1; i <= N; i++) {
    for (j = i + 1; j <= N; j++)
      if (l[i] == l[j]) {
        count = count + 1;
        check = 1;
      }
    if (count > max) max = count;
    count = 1;
    if (check == 1) V = V + 1;
    check = 0;
  }
  printf("%d %d", max, N - V);
}
