#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
map<int, int>::iterator it;
bool compare(pair<int, int> a, pair<int, int> b) { return a.second > b.second; }
int main() {
  int kase, a;
  while (cin >> kase) {
    mp.clear();
    for (int i = 0; i < kase; i++) {
      cin >> a;
      mp[a]++;
    }
    int m = 0;
    for (it = mp.begin(); it != mp.end(); ++it) {
      if (m < it->second) {
        m = it->second;
      }
    }
    cout << m << " " << mp.size() << endl;
  }
  return 0;
}
