#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sort = 0, arr[10001], a;
  cin >> n;
  set<int> v;
  for (int i = 0; i < n; i++) {
    cin >> a;
    v.insert(a);
    arr[a]++;
    sort = max(sort, arr[a]);
  }
  cout << sort << " " << v.size() << endl;
}
