#include <bits/stdc++.h>
int cmp(const void *_p, const void *_q) {
  int *p = (int *)_p;
  int *q = (int *)_q;
  return *p - *q;
}
int main() {
  int n, l[1010], i;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; i++) {
      scanf("%d", &l[i]);
    }
    qsort(l, n, sizeof(int), cmp);
    int flag = l[0], c = 1, h = 1, max = 0;
    for (i = 1; i < n; i++) {
      if (l[i] == flag) {
        h++;
        continue;
      } else {
        c++;
        if (h > max) max = h;
        flag = l[i];
        h = 1;
      }
    }
    if (h > max) max = h;
    printf("%d %d\n", max, c);
  }
  return 0;
}
