#include <bits/stdc++.h>
using namespace std;
int type, n, a[100];
int rates[9];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    rates[a[i] / 400]++;
  }
  for (int i = 0; i < 9; ++i) cout << rates[i] << " ";
  cout << endl;
  for (int i = 0; i < 8; ++i) type += (rates[i] > 0);
  int mi = type + (type == 0 && rates[8] > 0);
  int ma = min(8, type + min(8 - type, rates[8]));
  printf("%d %d\n", mi, ma);
}
