#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  map<string, int> color;
  cin >> N;
  for (int x = 0; x < (N); x++) {
    int k;
    cin >> k;
    if (k < 400) {
      color["g"]++;
    } else if (k < 800) {
      color["br"]++;
    } else if (k < 1200) {
      color["gr"]++;
    } else if (k < 1600) {
      color["wb"]++;
    } else if (k < 2000) {
      color["b"]++;
    } else if (k < 2400) {
      color["y"]++;
    } else if (k < 2800) {
      color["o"]++;
    } else if (k < 3200) {
      color["r"]++;
    } else {
      color["l"]++;
    }
  }
  int min, max;
  if (color["l"] == 0) {
    min = color.size() - 1;
    max = min;
  } else {
    min = color.size() - 1;
    if (min + color["l"] >= 8) {
      max = 8;
    } else {
      max = min + color["l"];
    }
    if (min == 0) {
      min = 1;
    }
  }
  cout << min << " " << max << endl;
}
