#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  int colors[8] = {};
  int other = 0;
  int a;
  int cnt = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a;
    if (a < 3200) {
      colors[a / 400] = 1;
    } else {
      other++;
    }
  }
  for (int i = 0; i < 8; i++) {
    cout << colors[i] << endl;
    cnt += colors[i];
  }
  cout << max(1, cnt) << ' ' << min(8, cnt + other);
  return 0;
}
