#include <bits/stdc++.h>
int main() {
  int N, a[100], i, j, gle = 0, bro = 0, gr = 0, miz = 0, blue = 0, yel = 0,
                       dai = 0, red = 0, min = 0, max = 0, cnt = 0;
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < N; i++) {
    if (a[i] < 399) {
      if (gle == 0) {
        cnt++;
        gle++;
        max++;
        min++;
      }
    } else if (a[i] < 799) {
      if (bro == 0) {
        cnt++;
        bro++;
        max++;
        min++;
      }
    } else if (a[i] < 1199) {
      if (gr == 0) {
        cnt++;
        gr++;
        max++;
        min++;
      }
    } else if (a[i] < 1599) {
      if (miz == 0) {
        cnt++;
        miz++;
        max++;
        min++;
      }
    } else if (a[i] < 1999) {
      if (blue == 0) {
        cnt++;
        blue++;
        max++;
        min++;
      }
    } else if (a[i] < 2399) {
      if (yel == 0) {
        cnt++;
        yel++;
        max++;
        min++;
      }
    } else if (a[i] < 2799) {
      if (dai == 0) {
        cnt++;
        dai++;
        max++;
        min++;
      }
    } else if (a[i] < 3199) {
      if (red == 0) {
        cnt++;
        red++;
        max++;
        min++;
      }
    }
  }
  for (i = 0; i < N; i++) {
    if (a[i] >= 3200) {
      if (cnt < 7) {
        cnt++;
        max++;
      }
    }
  }
  printf("%d %d\n", min, max);
  return 0;
}
