#include <bits/stdc++.h>
using namespace std;
int n, x, f[1001], s, MAX = -1;
int main() {
  cin >> n;
  while (n--) {
    cin >> x;
    f[x]++;
  }
  for (int i = 1; i <= 1000; i++) {
    if (f[i]) {
      s++;
      MAX = MAX > f[i] ? MAX : f[i];
    }
  }
  cout << MAX << " " << s << endl;
  return 0;
}
