#include <bits/stdc++.h>
using namespace std;
int a[9];
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int tmp;
    cin >> tmp;
    if (1 <= tmp && tmp <= 399)
      a[0]++;
    else if (400 <= tmp && tmp <= 799)
      a[1]++;
    else if (800 <= tmp && tmp <= 1199)
      a[2]++;
    else if (1200 <= tmp && tmp <= 1599)
      a[3]++;
    else if (1600 <= tmp && tmp <= 1999)
      a[4]++;
    else if (2000 <= tmp && tmp <= 2399)
      a[5]++;
    else if (2400 <= tmp && tmp <= 2799)
      a[6]++;
    else if (2800 <= tmp && tmp <= 3199)
      a[7]++;
    else
      a[8]++;
  }
  int cnt = 0;
  for (int i = 0; i < 8; i++) {
    if (a[i] > 0) cnt++;
  }
  cout << cnt << endl;
  cout << a[8] << endl;
  int maxans, minans;
  if (cnt < a[8]) {
    minans = cnt;
    maxans = cnt + a[8];
  } else if (cnt == a[8]) {
    minans = a[8];
    maxans = cnt + a[8];
  } else {
    minans = cnt;
    maxans = cnt + a[8];
  }
  cout << minans << " " << maxans << endl;
  return 0;
}
