#include <bits/stdc++.h>
using namespace std;
int main() {
  long int c, maxi = 0;
  cin >> c;
  static long int x = c;
  long int arr[x], arr2[x];
  for (long int i = 0; i < x; i++) {
    cin >> arr[i];
    arr2[i] = 1;
  }
  for (long int i = 0; i < c; i++) {
    for (long int j = 0; j < c; j++) {
      if (arr[i] == arr[j] && i != j) {
        for (long int l = j; l < c; l++) arr[l] = arr[l + 1];
        arr2[i]++;
        c--;
        j--;
      }
    }
  }
  for (long int i = 0; i < c; i++)
    if (arr2[i] > maxi) maxi = arr2[i];
  cout << maxi << " " << c << endl;
  return 0;
}
