#include <bits/stdc++.h>
int main() {
  int i, N;
  int a[100];
  int MAX = 0, MIN = 1000;
  int hai = 0, tya = 0, midori = 0, mizu = 0, ao = 0, ki = 0, sumi = 0, aka = 0,
      hoka = 0;
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < N; i++) {
    if (a[i] < 400 && a[i] > 0) {
      hai = 1;
    } else if (a[i] < 800) {
      tya = 1;
    } else if (a[i] < 1200) {
      midori = 1;
    } else if (a[i] < 1600) {
      mizu = 1;
    } else if (a[i] < 2000) {
      ao = 1;
    } else if (a[i] < 2400) {
      ki = 1;
    } else if (a[i] < 2800) {
      sumi = 1;
    } else if (a[i] < 3200) {
      aka = 1;
    } else if (a[i] >= 3200 && 4800 > a[i]) {
      hoka++;
    }
  }
  MIN = hai + tya + midori + mizu + ao + ki + sumi + aka;
  if (hoka == 1) {
    MAX = MIN + 1;
    printf("MIN&MAX %d %d\n", MIN, MAX);
  } else if (hoka == 2) {
    MAX = MIN + 2;
  } else {
    MAX = MIN;
  }
  printf("%d %d", MIN, MAX);
  return 0;
}
