#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ar[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  sort(ar, ar + n);
  int max_height = 0, count = 0, nu = 0;
  for (int i = 0; i < n - 1; i++) {
    if (ar[i] == ar[i + 1]) {
      nu += 1;
    } else {
      if (nu > max_height) {
        max_height = nu;
      }
      nu = 0;
    }
  }
  if (nu > max_height) {
    max_height = nu;
  }
  int i = 0;
  while (i < n) {
    if (ar[i] != ar[i + 1]) {
      count += 1;
    }
    i += 1;
  }
  cout << max_height + 1 << " " << count << "\n";
  return 0;
}
