#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  scanf("%d", &N);
  int a[N + 2];
  bool c[15];
  int x = 0;
  int y = 0;
  int MAX = 0;
  int MIN = 100;
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < 14; i++) {
    c[i] = false;
  }
  for (int i = 0; i < N; i++) {
    if (3200 <= a[i]) {
      x++;
    }
    int q = a[i] / 400;
    c[q] = true;
  }
  for (int i = 0; i <= 7; i++) {
    if (c[i] == true) {
      y++;
    }
  }
  printf("%d\n", x);
  printf("%d\n", y);
  MAX = min(8, x + y);
  if (x = 0) {
    MAX = y;
  } else {
    MIN = max(1, y);
  }
  printf("%d %d\n", MIN, MAX);
}
