#include <bits/stdc++.h>
int main() {
  int n, i, ara[1001], count = 0, j, temp, min = 0, height, p;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &ara[i]);
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (ara[j] < ara[i]) {
        temp = ara[i];
        ara[i] = ara[j];
        ara[j] = temp;
      }
    }
  }
  for (i = 0; i < n; i++) {
    height = 1;
    p = 0;
    for (j = i + 1; j < n; j++) {
      if (ara[i] != ara[j]) {
        count++;
        break;
      } else {
        height++;
        p++;
      }
    }
    if (height > min) {
      min = height;
    }
    i = i + p;
  }
  printf("%d %d", min, count + 1);
}
