#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int maxx = -1;
  set<int> s;
  map<int, int> m;
  vector<int> l(n);
  for (int i = 0; i < n; i++) {
    cin >> l[i];
    m[l[i]]++;
    if (m[l[i]] > maxx) maxx = m[l[i]];
    s.insert(l[i]);
  }
  cout << maxx << " " << s.size() << endl;
  return 0;
}
