#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a, temp;
  int b[9] = {0};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    temp = a / 400;
    if (temp < 8) {
      b[temp]++;
    } else
      b[8]++;
  }
  for (int i = 0; i < 9; i++) {
    cout << b[i] << ",";
  }
  cout << endl;
  int nMin, nMax;
  nMin = n;
  nMax = 0;
  for (int i = 0; i < 8; i++) {
    if (nMin > b[i] && b[i] != 0) {
      nMin = b[i];
    }
  }
  for (int i = 0; i < 8; i++) {
    if (nMax < b[i] && b[i] != 0) {
      nMax = b[i];
    }
  }
  cout << nMin << "," << nMax << endl;
  int min = 0;
  int max = 0;
  if (nMin == 0)
    min = 1;
  else {
    for (int i = 0; i < 8; i++) {
      if (nMin == b[i]) {
        min++;
      }
    }
  }
  for (int i = 0; i < 8; i++) {
    if (nMax == b[i]) {
      max++;
    }
  }
  cout << min << " " << max + b[8] << endl;
  return 0;
}
