#include <bits/stdc++.h>
using namespace std;
int n, tp[1001], mx, as;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int in;
    scanf("%d", &in);
    tp[in]++;
    mx = max(mx, tp[in]);
  }
  for (int i = 1; i <= 1000; i++) {
    if (tp[i] >= 1) as++;
  }
  printf("%d %d", mx, as);
  return 0;
  while (1) puts("(〃'▽'〃)");
}
