#include <bits/stdc++.h>
using namespace std;
template <typename type>
void sort(type Arr[], int size) {
  type val;
  for (int i = 1; i < size; i++) {
    for (int j = 0; j < size - 1; j++) {
      if (Arr[j] > Arr[j + 1]) {
        val = Arr[j];
        Arr[j] = Arr[j + 1];
        Arr[j + 1] = val;
      }
    }
  }
}
template <typename type>
void MaxSames(type Arry[], int size) {
  int count = 0, max = 0;
  int sz = size;
  sort(Arry, size);
  for (int i = 1; i < size; i++) {
    if (Arry[i] == Arry[i - 1]) {
      count++;
      sz--;
    }
    if (max < count) {
      max = count;
    }
    if (Arry[i] != Arry[i - 1]) {
      count = 0;
    }
  }
  cout << max + 1 << " " << sz << endl;
}
int main() {
  int Nums[1000], n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> Nums[i];
  }
  MaxSames(Nums, n);
  return 0;
}
