#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, arr[1005] = {0}, count = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    arr[a]++;
  }
  sort(arr, arr + 1005);
  cout << arr[1004] << " ";
  int i = 1004;
  while (arr[i]) {
    count++;
    i--;
  }
  cout << count << endl;
}
