#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  map<int, int> m;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    m[a]++;
  }
  map<int, int>::iterator pos;
  int max = -1;
  for (pos = m.begin(); pos != m.end(); pos++) {
    if (max < pos->second) max = pos->second;
  }
  cout << max << " " << m.size();
  return 0;
}
