#include <bits/stdc++.h>
using namespace std;
int n, l[1010], ch, h = 0, kol = 0;
int main() {
  cin >> n;
  memset(l, 0, sizeof l);
  for (int i = 0; i < n; ++i) {
    cin >> ch;
    ++l[ch];
  }
  for (int i = 0; i <= 1000; ++i) {
    if (l[i]) ++kol;
    h = max(h, l[i]);
  }
  cout << h << ' ' << kol;
  return 0;
}
