#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int N, cn = 0, Z = 0, max = 0;
  cin >> N;
  int arr[N];
  for (int i = 0; i < N; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < N; i++) {
    cn = 0;
    for (int j = i + 1; j < N; j++) {
      if (arr[i] == arr[j] && arr[j] != 0) {
        cn++;
        arr[j] = 0;
      }
    }
    if (max <= cn) {
      max = cn;
    }
    if (cn >= 1) {
      Z += cn;
    }
  }
  cout << max + 1 << " " << N - Z;
  return 0;
}
