#include <bits/stdc++.h>
int main() {
  int N, a, i, gray = 0, brown = 0, green = 0, water = 0, blue = 0, yel = 0,
               ore = 0, red = 0, upper = 0, max;
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%d", &a);
    if (0 < a && a < 400) {
      gray = 1;
    }
    if (400 <= a && a < 800) {
      brown = 1;
    }
    if (800 <= a && a < 1200) {
      green = 1;
    }
    if (1200 <= a && a < 1600) water = 1;
    if (1600 <= a && a < 2000) blue = 1;
    if (2000 <= a && a < 2400) yel = 1;
    if (2400 <= a && a < 2800) ore = 1;
    if (2800 <= a && a < 3200) red = 1;
    if (a >= 3200) upper++;
  }
  max = gray + brown + green + water + blue + yel + ore + red;
  if (max == 8) upper = 0;
  printf("%d ", gray + brown + green + water + blue + yel + ore + red);
  printf("%d", gray + brown + green + water + blue + yel + ore + red + upper);
  return 0;
}
