#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int num[1001], h[1001];
  while (cin >> n) {
    memset(num, 0, sizeof num);
    memset(h, 0, sizeof h);
    int max = -1;
    for (int i = 0; i < n; i++) cin >> num[i];
    int k = 0;
    for (int i = 0; i < n; i++) h[num[i]]++;
    for (int i = 0; i < 1001; i++)
      if (h[i] > max) max = h[i];
    for (int i = 0; i < 1001; i++)
      if (h[i] > 0) k++;
    cout << max << " " << k << endl;
  }
  return 0;
}
