#include <bits/stdc++.h>
using namespace std;
int main() {
  map<int, int> tab;
  std::map<int, int>::iterator p;
  int n;
  int x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    tab[x]++;
  }
  x = 0;
  int nb = 0;
  for (p = tab.begin(); p != tab.end(); ++p) {
    nb++;
    if (p->second > x) {
      x = p->second;
    }
  }
  cout << x << " " << nb;
}
