#include <bits/stdc++.h>
long long inf = (1LL << 62);
using namespace std;
signed main() {
  long long n;
  cin >> n;
  vector<bool> ch_colers(8, false);
  long long cntR = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (x <= 399) {
      ch_colers[0] = true;
    } else if (x <= 799) {
      ch_colers[1] = true;
    } else if (x <= 1199) {
      ch_colers[2] = true;
    } else if (x <= 1599) {
      ch_colers[3] = true;
    } else if (x <= 1999) {
      ch_colers[4] = true;
    } else if (x <= 2399) {
      ch_colers[5] = true;
    } else if (x <= 2799) {
      ch_colers[6] = true;
    } else if (x <= 3199) {
      ch_colers[7] = true;
    } else {
      cntR++;
    }
  }
  long long cnt = 0;
  for (long long i = 0; i < 8; i++) {
    if (ch_colers[i]) {
      cnt++;
    }
  }
  if (cntR == 0) {
    cout << cnt << " " << cnt;
  } else if (cnt == 0) {
    cout << 1 << " " << cntR;
  } else {
    if (cnt == 8) {
      cout << 8 << " " << 8;
    } else if (cnt + cntR >= 8) {
      cout << cnt << " " << 8;
    } else {
      cout << cnt << " " << cnt + cntR;
    }
  }
}
