#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  bool col[8];
  int ex1 = 0, ex2 = 0;
  cin >> n;
  for (int i = 0; i < 8; i++) {
    col[i] = false;
  }
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a >= 1 && a < 400) {
      col[0] = true;
    } else if (400 <= a && a < 800) {
      col[1] = true;
    } else if (800 <= a && a < 1200) {
      col[2] = true;
    } else if (1200 <= a && a < 1600) {
      col[3] = true;
    } else if (1600 <= a && a < 2000) {
      col[4] = true;
    } else if (2000 <= a && a < 2400) {
      col[5] = true;
    } else if (2400 <= a && a < 2800) {
      col[6] = true;
    } else if (2800 <= a && a < 3200) {
      col[7] = true;
    } else {
      ex1++;
    }
  }
  int ans1 = 0, ans2 = 0;
  for (int i = 0; i < 8; i++) {
    if (col[i]) {
      ans1++;
    } else {
      ex2++;
    }
  }
  cout << ex1 << ex2 << endl;
  cout << ans1 << ' ' << ans1 + min(ex2, ex1) << endl;
  return 0;
}
