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