#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  int a[100];
  int typeCnt = 0;
  bool isHai = false;
  bool isTya = false;
  bool isMidori = false;
  bool isMizu = false;
  bool isAo = false;
  bool isKi = false;
  bool isDai = false;
  bool isAka = false;
  int overCnt = 0;
  int min;
  int max;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    if (typeCnt >= 8) {
      break;
    }
    if (a[i] >= 1 && a[i] < 400 && isHai == false) {
      typeCnt++;
      isHai = true;
      continue;
    }
    if (a[i] >= 400 && a[i] < 800 && isTya == false) {
      typeCnt++;
      isTya = true;
      continue;
    }
    if (a[i] >= 800 && a[i] < 1200 && isMidori == false) {
      typeCnt++;
      isMidori = true;
      continue;
    }
    if (a[i] >= 1200 && a[i] < 1600 && isMizu == false) {
      typeCnt++;
      isMizu = true;
      continue;
    }
    if (a[i] >= 1600 && a[i] < 2000 && isAo == false) {
      typeCnt++;
      isAo = true;
      continue;
    }
    if (a[i] >= 2000 && a[i] < 2400 && isKi == false) {
      typeCnt++;
      isKi = true;
      continue;
    }
    if (a[i] >= 2400 && a[i] < 2800 && isDai == false) {
      typeCnt++;
      isDai = true;
      continue;
    }
    if (a[i] >= 2800 && a[i] < 3200 && isAka == false) {
      typeCnt++;
      isAka = true;
      continue;
    }
    if (a[i] >= 3200) {
      overCnt++;
    }
  }
  if (typeCnt == 0) {
    min = 1;
  } else {
    min = typeCnt;
  }
  max = typeCnt + overCnt;
  if (max > 8) {
    max = 8;
  }
  cout << min << ' ' << max << endl;
  return 0;
}
