#include <bits/stdc++.h>
using namespace std;
string returnRate(int n) {
  if (n < 400) {
    return "gray";
  } else if (n < 800) {
    return "brawn";
  } else if (n < 1200) {
    return "green";
  } else if (n < 1600) {
    return "water";
  } else if (n < 2000) {
    return "blue";
  } else if (n < 2400) {
    return "yellow";
  } else if (n < 2800) {
    return "orange";
  } else if (n < 3200) {
    return "red";
  } else {
    return "all";
  }
}
int main(void) {
  int n;
  cin >> n;
  map<string, bool> existColor;
  int countAll = 0;
  for (int i = 0; i < n; ++i) {
    int rate;
    cin >> rate;
    if (returnRate(rate) != "all") {
      existColor[returnRate(rate)] = true;
    } else {
      countAll++;
    }
  }
  printf("%d %d\n", existColor.size(), existColor.size() + countAll);
}
