#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int *towers = new int[n];
    for (int i = 0; i < n; i++) {
      cin >> towers[i];
    }
    int number_of_towers = 0;
    int hight = 1;
    bool flag = false;
    int max = 1;
    for (int i = 0; i < n; i++) {
      hight = 1;
      flag = false;
      for (int j = i + 1; j < n; j++) {
        if (towers[i] == towers[j]) {
          flag = true;
          hight++;
        }
      }
      if (flag == false) number_of_towers++;
      if (hight > max) max = hight;
    }
    cout << max << " " << number_of_towers << endl;
  }
  return 0;
}
