#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int a[1002], b[1002];
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      b[a[i]]++;
    }
    sort(a, a + n);
    int tol = 0, max = 0;
    for (int i = a[0]; i <= a[n - 1]; i++) {
      if (b[i] != 0) tol++;
      if (b[i] > max) max = b[i];
    }
    cout << max << " " << tol << endl;
  }
  return 0;
}
