#include <bits/stdc++.h>
using namespace std;
using Int = long long;
int main() {
  int N;
  cin >> N;
  int ns[9] = {};
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    ns[min(a / 400, 8)]++;
  }
  int cnt = 0;
  for (int i = 0; i < 8; i++)
    if (ns[i]) cnt++;
  do {
    cout << "ns"
            ": ";
    for (const auto &i : ns) {
      cout << i << " ";
    }
    cout << endl;
  } while (0);
  cout << max(1, cnt) << " " << cnt + ns[8] << endl;
  return 0;
}
