#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  map<int, int> m;
  int q, max_height = 0;
  cin >> q;
  while (q--) {
    int n;
    cin >> n;
    m[n]++;
    if (m[n] > max_height) max_height = m[n];
  }
  cout << max_height << ' ' << m.size();
  return 0;
}
