#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 1, mx = 1;
  cin >> n;
  int l = 0;
  bool ar[1010] = {0};
  int arr[1010];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    ar[arr[i]] = 1;
  }
  for (int i = 0; i < n; i++) {
    c = 1;
    for (int j = i + 1; j < n; j++) {
      if (arr[i] == arr[j]) {
        c++;
      }
    }
    mx = max(mx, c);
  }
  for (int i = 1; i <= 1000; i++)
    if (ar[i] == 1) l++;
  cout << mx << " " << l << endl;
  return 0;
}
