#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int m = n;
  set<int> s;
  map<int, int> x;
  while (n--) {
    int a;
    cin >> a;
    x[a]++;
    s.insert(a);
  }
  int z = -1;
  for (auto u : x) {
    if (u.second > z) {
      z = u.second;
    }
  }
  cout << z << " " << s.size() << endl;
  return 0;
}
