#include <bits/stdc++.h>
using namespace std;
template <class T>
int len(const T& c) {
  return (int)c.size();
}
map<int, int> m;
int n, t1, t2;
int main() {
  cin >> n;
  for (int i(0), _n(n); i < _n; ++i) {
    cin >> t1;
    m[t1]++;
    t2 = max(t2, m[t1]);
  }
  cout << t2 << " " << len(m);
}
