#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, l, c, nr, nnr;
  int v[1001];
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v, v + n);
  c = 1;
  l = 1;
  nr = 1;
  for (i = 0; i < n - 1; i++) {
    if (v[i] == v[i + 1])
      c++;
    else {
      if (c > l) l = c;
      c = 1;
      nr++;
    }
  }
  if (c > l) l = c;
  cout << l << " " << nr;
  return 0;
}
