#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N, over, count;
  over = 0;
  count = 0;
  bool judge[8] = {false};
  cin >> N;
  for (int i = 0; i < N; i++) {
    int in_temp;
    cin >> in_temp;
    if (in_temp >= 1 && in_temp <= 399) {
      judge[0] = true;
    } else if (in_temp >= 400 && in_temp <= 799) {
      judge[1] = true;
    } else if (in_temp >= 800 && in_temp <= 1199) {
      judge[2] = true;
    } else if (in_temp >= 1200 && in_temp <= 1599) {
      judge[3] = true;
    } else if (in_temp >= 1600 && in_temp <= 1999) {
      judge[4] = true;
    } else if (in_temp >= 2000 && in_temp <= 2399) {
      judge[5] = true;
    } else if (in_temp >= 2400 && in_temp <= 2799) {
      judge[6] = true;
    } else if (in_temp >= 2800 && in_temp <= 3199) {
      judge[0] = true;
    } else {
      over++;
    }
  }
  for (int i = 0; i < 8; i++) {
    if (judge[i] == true) count++;
  }
  if (count == 0) {
    cout << 1 << " " << 1 + over << endl;
  } else {
    cout << count << " " << count + over << endl;
  }
  cout << count << " " << count + over << endl;
  return 0;
}
