#include <bits/stdc++.h>
using namespace std;
int main() {
  int length[1001] = {0};
  int towers = 0;
  int tall = 0;
  int i = 0, n, l;
  cin >> n;
  while (i < n) {
    cin >> l;
    if (length[l] == 0) {
      towers++;
    }
    length[l]++;
    if (length[l] > tall) {
      tall = length[l];
    }
    i++;
  }
  cout << tall << " " << towers;
  return 0;
}
