#include <bits/stdc++.h>
using namespace std;
int n, i, k = 0, m = 0, b[1001], a;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a;
    if (b[a] == 0) k++;
    b[a]++;
    m = max(m, b[a]);
  }
  cout << m << " " << k;
  return 0;
}
