#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[1001] = {0};
  int n, m, h = 0, count = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> m;
    a[m]++;
  }
  for (int i = 0; i <= 1000; i++) {
    if (a[i]) {
      if (a[i] >= h) {
        h = a[i];
      }
      count++;
    }
  }
  cout << h << " " << count << endl;
  return 0;
}
