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