#include <bits/stdc++.h>
using namespace std;
int N, frequency[1002], tower;
int most_freq = 0, towers = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N;
  while (N--) {
    cin >> tower;
    towers += !frequency[tower];
    frequency[tower]++;
    most_freq = max(most_freq, frequency[tower]);
  }
  cout << most_freq << " " << towers << '\n';
  return 0;
}
