#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    a.push_back(t);
  }
  sort(a.begin(), a.end());
  int res = 0, k = 0;
  for (int i = 0; i < n; i++) {
    int b = a[i];
    int m = 0;
    k++;
    while (i < n && b == a[i]) {
      m++;
      i++;
    }
    i--;
    res = max(m, res);
  }
  cout << res << " " << k << endl;
}
