#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, maxLength = 0, counter = 0;
  cin >> n;
  int freq[1001] = {};
  for (int i = 0; i < n; i++) {
    int number;
    cin >> number;
    freq[number]++;
  }
  for (int i = 0; i < 1001; i++) {
    if (freq[i]) counter++;
    if (freq[i] > maxLength) maxLength = freq[i];
  }
  cout << maxLength << " " << counter << endl;
  return 0;
}
