#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y = 0;
  cin >> x;
  int* arr = new int[x];
  vector<int> towers;
  for (int i = 0; i < x; i++) cin >> arr[i];
  sort(arr, arr + x);
  for (int i = 0; i < x;) {
    towers.push_back(1);
    for (int s = i; s < x; s++) {
      i++;
      if (arr[s] != arr[s + 1])
        break;
      else
        towers[y]++;
    }
    y++;
  }
  sort(towers.begin(), towers.end());
  cout << towers[towers.size() - 1] << " " << towers.size();
  return 0;
}
