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