#include <bits/stdc++.h>
using namespace std;
int main() {
  int i = 1, t, s = 1, n, mx = -1000000000, dizi[1005], len = 0;
  cin >> n;
  if (n == 1) {
    cout << "1 1";
    return 0;
  }
  for (; i <= n; i++) cin >> dizi[i];
  sort(dizi + 1, dizi + n + 1);
  t = dizi[1];
  for (i = 2; i <= n; i++) {
    if (dizi[i - 1] != dizi[i]) {
      s++;
      len = 0;
    }
    if (dizi[i - 1] == dizi[i]) len++;
    if (len > mx) mx = len;
  }
  cout << mx + 1 << " " << s;
  return 0;
}
