#include <bits/stdc++.h>
using namespace std;
void solve() {
  int N, a, min = 0, max = 0;
  vector<int> C(9, 0);
  cin >> N;
  for (long long i = 0; i < (long long)(N); i++) {
    cin >> a;
    if (a >= 3200) {
      C[8] += 1;
    } else {
      C[a / 400] += 1;
    }
  }
  for (long long i = 0; i < (long long)(9); i++) {
    cout << C[i] << endl;
  }
  for (long long i = 0; i < (long long)(8); i++) {
    if (C[i] > 0) {
      min++;
      max++;
    }
  }
  max += C[8];
  if (min == 0) {
    min = 1;
  }
  cout << min << " " << max << endl;
}
signed main() {
  solve();
  return 0;
}
