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