#include <bits/stdc++.h>
int main() {
  int n;
  int a[100], color[9] = {0};
  int i, j, k;
  int min;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", a + i);
    if (a[i] >= 1 && a[i] <= 399) color[0]++;
    if (a[i] >= 400 && a[i] <= 799) color[1]++;
    if (a[i] >= 800 && a[i] <= 1199) color[2]++;
    if (a[i] >= 1200 && a[i] <= 1599) color[3]++;
    if (a[i] >= 1600 && a[i] <= 1999) color[4]++;
    if (a[i] >= 2000 && a[i] <= 2399) color[5]++;
    if (a[i] >= 2400 && a[i] <= 2799) color[6]++;
    if (a[i] >= 2800 && a[i] <= 3199) color[7]++;
    if (a[i] >= 3200) color[8]++;
  }
  for (i = 0; i < 7; i++) {
    min = color[i];
    k = i;
    for (j = i + 1; j < 8; j++) {
      if (min > color[j]) {
        min = color[j];
        k = j;
        if (k != i) {
          color[j] = color[i];
          color[i] = min;
        }
      }
    }
  }
  k = 0;
  min = 0;
  for (i = 0; i < 8; i++) {
    if (color[i] != 0)
      k++;
    else
      min++;
  }
  if (min != 0 && color[8] <= min)
    printf("%d %d ", k, k + color[8]);
  else if (min != 0 && color[8] > min)
    printf("%d %d ", k, k + color[8]);
  else if (min == 0 && color[8] != 0)
    printf("%d %d ", k, k + color[8]);
  else if (min == 0 && color[8] == 0)
    printf("%d %d ", k, k);
  return 0;
}
