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