#include <bits/stdc++.h>
using namespace std;
int main() {
  int N = 0;
  int a[100];
  int iro[8];
  int ziyuu = 0;
  int i = 0;
  int c = 0;
  int ans = 0;
  cin >> N;
  for (i = 0; i < 8; i++) {
    iro[i] = 0;
  }
  for (i = 0; i < N; i++) {
    cin >> a[i];
    if (1 <= a[i] && a[i] <= 399) iro[0] = 1;
    if (400 <= a[i] && a[i] <= 799) iro[1] = 1;
    if (800 <= a[i] && a[i] <= 1199) iro[2] = 1;
    if (1200 <= a[i] && a[i] <= 1599) iro[3] = 1;
    if (1600 <= a[i] && a[i] <= 1999) iro[4] = 1;
    if (2000 <= a[i] && a[i] <= 2399) iro[5] = 1;
    if (2400 <= a[i] && a[i] <= 2799) iro[6] = 1;
    if (2800 <= a[i] && a[i] <= 3199) iro[7] = 1;
    if (3200 <= a[i]) ziyuu = ziyuu + 1;
  }
  for (i = 0; i < 8; i++) {
    ans = ans + iro[i];
  }
  if (ans == 0 && ziyuu == 0)
    cout << "0"
         << " ";
  if (ans == 0 && ziyuu > 0)
    cout << "1"
         << " ";
  if (ans != 0 && ans < ziyuu)
    cout << "1"
         << " ";
  if (ans != 0 && ans > ziyuu) cout << ans << " ";
  if (ziyuu + ans >= 8) cout << "8";
  if (ziyuu + ans < 8) cout << ziyuu + ans;
}
