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