#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int count = 0, max = 1, n, length[1024], i, j;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> length[i];
    for (int j = i - 1; j >= 0; j--) {
      int temp = 1;
      if (length[j] == length[i]) {
        count++;
        temp++;
        for (j = j - 1; j >= 0; j--) {
          if (length[j] == length[i]) {
            temp++;
          }
        }
        max = (temp > max) ? temp : max;
      }
    }
  }
  cout << max << " " << n - count;
  return 0;
}
