#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n], b[9], m = 0, x = 0;
  for (int i = 0; i < 7; i++) b[i] = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] >= 3200)
      m++;
    else
      b[a[i] / 400]++;
    for (int i = 1; i <= 8; i++) {
      if (b[i] > 0) x++;
    }
    cout << x << ' ';
    if (x + m >= 8)
      cout << 8;
    else
      cout << x + m;
  }
  for (int i = 0; i < 7; i++) {
    if (b[i] > 0) x++;
  }
  cout << max(x, m);
  if (x + m >= 8)
    cout << 8;
  else
    cout << x + m;
}
