#include <bits/stdc++.h>
int main(void) {
  int n;
  int max = 0;
  int min = 0;
  int i;
  int count = 0;
  int x1 = 0;
  int x2 = 0;
  int x3 = 0;
  int x4 = 0;
  int x5 = 0;
  int x6 = 0;
  int x7 = 0;
  int x8 = 0;
  int a = 0;
  int x[100];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &x[i]);
    if (x[i] >= 3200) {
      a = a + 1;
    }
    if (1 <= x[i] && x[i] < 400) {
      x1 = 1;
    }
    if (400 <= x[i] && x[i] < 800) {
      x2 = 1;
    }
    if (800 <= x[i] && x[i] < 1200) {
      x3 = 1;
    }
    if (1200 <= x[i] && x[i] < 1600) {
      x4 = 1;
    }
    if (1600 <= x[i] && x[i] < 2000) {
      x5 = 1;
    }
    if (2000 <= x[i] && x[i] < 2400) {
      x6 = 1;
    }
    if (2400 <= x[i] && x[i] < 2800) {
      x7 = 1;
    }
    if (2800 <= x[i] && x[i] < 3200) {
      x8 = 1;
    }
  }
  if (x1 == 1) {
    count = count + 1;
  }
  if (x2 == 1) {
    count = count + 1;
  }
  if (x3 == 1) {
    count = count + 1;
  }
  if (x4 == 1) {
    count = count + 1;
  }
  if (x5 == 1) {
    count = count + 1;
  }
  if (x6 == 1) {
    count = count + 1;
  }
  if (x7 == 1) {
    count = count + 1;
  }
  if (x8 == 1) {
    count = count + 1;
  }
  min = count;
  if (min == 0) min = 1;
  max = count + a;
  if (max > 8) max = 8;
  printf("%d %d", min, max);
  return 0;
}
