#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, k, max = 0;
  cin >> a;
  vector<int> lengs;
  for (int i = 0; i < a; i++) {
    cin >> k;
    lengs.push_back(k);
  }
  for (int i = 0; i < a; i++) {
    k = std::count(lengs.begin(), lengs.end(), lengs[i]);
    if (max < k) {
      max = k;
    }
  }
  set<int> phela(lengs.begin(), lengs.end());
  k = phela.size();
  cout << max << " " << k << endl;
}
