#include <bits/stdc++.h>
using namespace std;
int bc[1001];
int main() {
  int a, t;
  cin >> a;
  for (int i = 0; i < a; i++) {
    cin >> t;
    bc[t] = bc[t] + 1;
  }
  int maxi = 0, sum = 0;
  for (int i = 0; i < 1001; i++) {
    if (bc[i] > 0) {
      sum++;
    }
    if (bc[i] > maxi) {
      maxi = bc[i];
    }
  }
  cout << maxi << " " << sum;
}
