#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int l[n], h = 1, ans = 1, m = n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &l[i]);
  }
  for (int i = 0, j = 0; i < n; i++) {
    j = i + 1;
    if (l[i] != 0) {
      for (; j < n; j++) {
        if (l[i] == l[j]) {
          h++;
          m--;
          l[j] = 0;
        }
      }
    }
    if (h > ans) {
      ans = h;
    }
    h = 1;
  }
  printf("%d %d", ans, m);
  return 0;
}
