#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int t[n];
  for (int i = 0; i < n; i++) {
    cin >> t[i];
  }
  sort(t, t + n);
  int s = n, h = 1;
  int ref = 0;
  for (int i = 1; i < n; i++) {
    int count = 0;
    while (t[i] == t[ref]) {
      count++;
      i++;
    }
    ref = i;
    s -= count;
    h = max(h, count + 1);
  }
  cout << h << " " << s << endl;
  return 0;
}
