#include <bits/stdc++.h>
using namespace std;
int main() {
  int rate[4800] = {0};
  int colorNum, i = 0;
  int varN = 0;
  int min = 0, max = 0, minN = 0;
  bool colorflag[8];
  memset(colorflag, false, sizeof(colorflag[0]));
  int countMax;
  cin >> countMax;
  for (i = 0; i != countMax; i++) {
    cin >> rate[i];
  }
  for (int ci = 0; ci != countMax; ci++) {
    if (1 <= rate[ci] && rate[ci] <= 399) {
      colorflag[0] = true;
    } else if (400 <= rate[ci] && rate[ci] <= 799) {
      colorflag[1] = true;
    } else if (800 <= rate[ci] && rate[ci] <= 1199) {
      colorflag[2] = true;
    } else if (1200 <= rate[ci] && rate[ci] <= 1599) {
      colorflag[3] = true;
    } else if (1600 <= rate[ci] && rate[ci] <= 1999) {
      colorflag[4] = true;
    } else if (2000 <= rate[ci] && rate[ci] <= 2399) {
      colorflag[5] = true;
    } else if (2400 <= rate[ci] && rate[ci] <= 2799) {
      colorflag[6] = true;
    } else if (2800 <= rate[ci] && rate[ci] <= 3199) {
      colorflag[7] = true;
    } else if (3200 <= rate[ci] && rate[ci] <= 4800) {
      varN++;
    }
  }
  for (int ci = 0; ci < 8; ci++) {
    if (colorflag[ci] == true) {
      min++;
    } else {
      minN++;
    }
  }
  if (minN == 0) {
    min = 1;
    max = varN;
  } else {
    max = min + varN;
    max = (8 < max) ? 8 : max;
  }
  cout << min << " " << max << endl;
  return 0;
}
