#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int arr[t];
  int maxitower = 0;
  int largsettower;
  int c = 0;
  int sumelements = t;
  for (int i = 0; i < t; i++) {
    cin >> arr[i];
  }
  for (int s = 0; s < t; s++) {
    c = 0;
    for (int i = 0; i < t; i++) {
      if (arr[s] == arr[i]) {
        c++;
      }
    }
    if (maxitower < c) {
      maxitower = c;
    }
  }
  cout << maxitower << " ";
  int x = 0;
  sort(arr, arr + t);
  for (int i = 0; i < t; i++) {
    if (arr[i] != arr[i + 1]) {
      x++;
    }
  }
  cout << x;
  return 0;
}
