#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int flg[9] = {0};
  int count = 0;
  int min = 0, max = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a < 400) {
      flg[0] = 1;
    } else if (a < 800) {
      flg[1] = 1;
    } else if (a < 1200) {
      flg[2] = 1;
    } else if (a < 1600) {
      flg[3] = 1;
    } else if (a < 2000) {
      flg[4] = 1;
    } else if (a < 2400) {
      flg[5] = 1;
    } else if (a < 2800) {
      flg[6] = 1;
    } else if (a < 3200) {
      flg[7] = 1;
    } else if (a >= 3200 && max <= 8) {
      max += 1;
    }
  }
  for (int i = 0; i < 9; i++) {
    min += flg[i];
  }
  cout << min << " " << (min + max) << endl;
}
