#include <bits/stdc++.h>
int minx(int v[], int n) {
  int i, j, k, tmp;
  tmp = v[0];
  for (i = 1; i <= n - 1; i++) {
    if (tmp > v[i]) tmp = v[i];
  }
  return tmp;
}
int maxx(int v[], int n) {
  int i, j, k, tmp;
  tmp = v[0];
  for (i = 1; i <= n - 1; i++) {
    if (tmp < v[i]) tmp = v[i];
  }
  return tmp;
}
int abs(int n) {
  if (n < 0) {
    return -1 * n;
  } else
    return n;
}
int max(int n1, int n2, int n3) {
  int tmp;
  tmp = n1;
  if (n2 > tmp) tmp = n2;
  if (n3 > tmp) tmp = n3;
  return tmp;
}
int max2(int n1, int n2) {
  int tmp;
  tmp = n1;
  if (n2 > tmp) tmp = n2;
  return tmp;
}
int min3(int n1, int n2, int n3) {
  int tmp;
  tmp = n1;
  if (n2 < tmp) tmp = n2;
  if (n3 < tmp) tmp = n3;
  return tmp;
}
int min2(int n1, int n2) {
  int tmp;
  tmp = n1;
  if (n2 < tmp) tmp = n2;
  return tmp;
}
int main(void) {
  int N, A, M, B, j, x, i, k, H, W, l, sum, m, mint, flag;
  scanf("%d", &N);
  int a[100];
  int t[100];
  int index[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
  flag = 0;
  sum = 0;
  mint = 0;
  for (i = 0; i <= N - 1; i++) {
    scanf("%d", &a[i]);
  }
  for (x = 0; x <= 7; x++) {
    for (j = 0; j <= N - 1; j++) {
      if (index[x] == a[j] / 400) {
        sum += 1;
        break;
      }
    }
  }
  for (k = 0; k <= N - 1; k++) {
    if (a[k] / 400 >= 8) {
      mint += 1;
    }
  }
  if (sum >= 8) {
    printf("8");
    printf("%d", 8 + mint);
  } else if (sum != 0) {
    printf("%d ", sum);
    printf("%d", sum + mint);
  } else {
    printf("1 ");
    printf("%d", mint);
  }
  return 0;
}
