#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int *x = new int[n];
  for (int i = 0; i < n; i++) cin >> x[i];
  int max = 1, counter = 1, k = n;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      if (x[i] > x[j]) swap(x[i], x[j]);
  for (int i = 0; i < n - 1; i++) {
    if (x[i] == x[i + 1]) {
      counter++;
      k--;
    } else {
      if (counter > max) max = counter;
      counter = 1;
    }
  }
  if (counter > max) {
    max = counter;
  }
  cout << max << "  " << k << endl;
  return 0;
}
