#include <bits/stdc++.h>
int fMain(int piTNo) {
  int i;
  char lc1Buf[1024], lc1Out[1024];
  int liHCnt;
  fgets(lc1Buf, sizeof(lc1Buf), stdin);
  sscanf(lc1Buf, "%d", &liHCnt);
  int li1Rank[8 + 5];
  memset(li1Rank, 0, sizeof(li1Rank));
  for (i = 0; i < liHCnt; i++) {
    int liVal;
    fscanf(stdin, "%d", &liVal);
    if (liVal < 1) {
      continue;
    }
    int liRNo = liVal / 400;
    if (liRNo > 8) {
      liRNo = 8;
    }
    li1Rank[liRNo]++;
  }
  fgets(lc1Buf, sizeof(lc1Buf), stdin);
  int liMin = 0;
  for (i = 0; i < 8; i++) {
    if (li1Rank[i] > 0) {
      liMin++;
    }
  }
  int liMax = liMin + li1Rank[8];
  sprintf(lc1Out, "%d %d\n", liMin, liMax);
  printf("%s", lc1Out);
  return 0;
}
int main() {
  fMain(0);
  return 0;
}
