#include <bits/stdc++.h>
using namespace std;
int n, a[109], mi, ma, b[15];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    for (int j = 1; j <= 8; j++) {
      if (a[i] < 400 * j) {
        b[j]++;
        if (b[j] == 1) mi++;
        break;
      }
    }
    if (a[i] >= 3200) b[9]++;
  }
  if (mi) {
    printf("%d ", mi);
    if (b[9]) {
      if (b[9] <= 8 - mi)
        printf("%d\n", mi + b[9]);
      else
        printf("8\n");
    } else
      printf("%d\n", mi);
  } else {
    printf("1 ");
    if (b[9] <= 8)
      printf("%d\n", b[9]);
    else
      printf("8\n");
  }
  return 0;
}
