#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int a[n];
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  sort(a, a + n);
  int h = 0, cont = 0;
  for (int i = 0; i < n; ++cont) {
    int e = i;
    while (e < n && a[e] == a[i]) ++e;
    h = max(h, e - i);
    i = e;
  }
  printf("%d %d\n", h, cont);
  return 0;
}
