#include <bits/stdc++.h>
using namespace std;
int main() {
  size_t const SIZE = 1001;
  int v[SIZE] = {0};
  size_t n, x, count(0);
  int hmax(0);
  cin >> n;
  for (size_t i = 0; i < n; i++) {
    cin >> x;
    v[x]++;
  }
  for (size_t i = 0; i < SIZE; i++) {
    if (v[i] > 0) {
      count++;
      hmax = max(hmax, v[i]);
    }
  }
  cout << hmax << " " << count << endl;
  return 0;
}
