#include <bits/stdc++.h>
void color_count(int, int *);
int main() {
  int N, min = 0, max = 0, color_type = 0;
  scanf("%d", &N);
  int a[N], color_board[9] = {0};
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
    color_count(a[i], color_board);
  }
  for (int i = 0; i < 8; i++) {
    if (color_board[i] > 0) {
      color_type++;
    }
  }
  min = color_type;
  max = color_type + color_board[8];
  if (max > 8) {
    max = 8;
  }
  printf("%d %d", min, max);
  return 0;
}
void color_count(int a, int *cb) {
  if (3200 <= a) {
    cb[8]++;
  } else if (2800 <= a && a <= 3199) {
    cb[7]++;
  } else if (2400 <= a && a <= 2799) {
    cb[6]++;
  } else if (2000 <= a && a <= 2399) {
    cb[5]++;
  } else if (1600 <= a && a <= 1999) {
    cb[4]++;
  } else if (1200 <= a && a <= 1599) {
    cb[3]++;
  } else if (800 <= a && a <= 1199) {
    cb[2]++;
  } else if (400 <= a && a <= 799) {
    cb[1]++;
  } else if (1 <= a && a <= 399) {
    cb[0]++;
  }
}
