#include <bits/stdc++.h>
using namespace std;
int main() {
  bool atcoder[7], full[1];
  int N, a;
  int v = 0;
  int res = 0;
  int red = 0;
  cin >> N;
  for (int i = 0; 8 > i; i++) atcoder[i] = true;
  for (int i = 0; N > i; i++) {
    cin >> a;
    while (a >= 400 * (v + 1)) {
      v++;
    }
    if (v > 7) {
      red++;
    } else {
      if (atcoder[v]) {
        res++;
        atcoder[v] = false;
      }
    }
  }
  int red2 = red;
  while (red) {
    if (red) {
      v = 0;
      while (v == 8 || !atcoder[v]) {
        v++;
      }
      if (v == 8) {
        full[0] = false;
        cout << res << " 8" << endl;
        break;
      }
      v = 0;
      while (v == 8 || atcoder[v]) {
        v++;
      }
      if (v == 8) {
        cout << red2 << " " << N << endl;
        break;
      }
      red--;
    }
  }
  cout << res << " " << res + red2 << endl;
}
