#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, a[10000], SUNADA = 0, HIGASHINO = 0, q = 0, w = 0, e = 0, r = 0, t = 0,
                   y = 0, u = 0, o = 0, BaKa = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    a[i] = 0;
    cin >> a[i];
  }
  for (int i = 0; i < N; i++) {
    if (a[i] <= 399 && q == 0) {
      SUNADA += 1;
      HIGASHINO += 1;
      q += 1;
    } else if (a[i] / 400 == 1 && w == 0) {
      SUNADA += 1;
      HIGASHINO += 1;
      w += 1;
    } else if (a[i] / 400 == 2 && e == 0) {
      SUNADA += 1;
      HIGASHINO += 1;
      e += 1;
    } else if (a[i] / 400 == 3 && r == 0) {
      SUNADA += 1;
      HIGASHINO += 1;
      r += 1;
    } else if (a[i] / 400 == 4 && t == 0) {
      SUNADA += 1;
      HIGASHINO += 1;
      t += 1;
    } else if (a[i] / 400 == 5 && y == 0) {
      SUNADA += 1;
      HIGASHINO += 1;
      y += 1;
    } else if (a[i] / 400 == 6 && u == 0) {
      SUNADA += 1;
      HIGASHINO += 1;
      u += 1;
    } else if (a[i] / 400 == 7 && o == 0) {
      SUNADA += 1;
      HIGASHINO += 1;
      o += 1;
    } else if (a[i] >= 3200 && BaKa == 0) {
      HIGASHINO += 1;
      BaKa += 1;
    }
    if (a[i] >= 3200) {
      SUNADA += 1;
    }
  }
  cout << HIGASHINO << " " << SUNADA << endl;
}
