#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  int bars[1001] = {0};
  for (int i = 0; i < n; ++i) {
    int tmp;
    cin >> tmp;
    bars[tmp]++;
  }
  int count = 0;
  int max = 0;
  for (int i = 0; i < 1001; ++i) {
    if (bars[i] > 0) {
      ++count;
      max = bars[i] > max ? bars[i] : max;
    }
  }
  cout << max << " " << count << endl;
  return 0;
}
