#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int a, c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, c6 = 0, c7 = 0, c8 = 0, cc = 0,
         c = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    if (a < 400 && c1 == 0) {
      c1++;
      c++;
    } else if (400 <= a && a < 800 && c2 == 0) {
      c2++;
      c++;
    } else if (800 <= a && a < 1200 && c3 == 0) {
      c3++;
      c++;
    } else if (1200 <= a && a < 1600 && c4 == 0) {
      c4++;
      c++;
    } else if (1600 <= a && a < 2000 && c5 == 0) {
      c5++;
      c++;
    } else if (2000 <= a && a < 2400 && c6 == 0) {
      c6++;
      c++;
    } else if (2400 <= a && a < 2800 && c7 == 0) {
      c7++;
      c++;
    } else if (2800 <= a && a < 3200 && c8 == 0) {
      c8++;
      c++;
    } else if (3200 <= a)
      cc++;
  }
  if (c == 0) {
    if (cc <= 8)
      printf("1 %d", cc);
    else
      printf("1 8");
  } else {
    if ((c + cc) > 8)
      printf("%d 8", c);
    else
      printf("%d %d", c, c + cc);
  }
}
