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