#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int key;
  vector<int> a;
  for (int i = 0; i < n; i++) {
    cin >> key;
    a.push_back(key);
  }
  sort(a.begin(), a.end());
  int larges = 1, total = 1, count = 1, count2 = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] != a[i - 1]) {
      count2++;
      if (count > larges) larges = count;
      count = 1;
    } else
      count++;
  }
  if (count > larges) larges = count;
  cout << larges << " " << count2;
}
