#include <bits/stdc++.h>
using namespace std;
int main(void) {
  std::map<string, int> map;
  map.emplace("grey", 0);
  map.emplace("brown", 0);
  map.emplace("green", 0);
  map.emplace("aqua", 0);
  map.emplace("blue", 0);
  map.emplace("yellow", 0);
  map.emplace("orange", 0);
  map.emplace("red", 0);
  int count = 0;
  int n, a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a >= 1 && 399 >= a) {
      map.at("grey")++;
    } else if (a >= 400 && 799 >= a) {
      map.at("brown")++;
    } else if (a >= 800 && 1199 >= a) {
      map.at("green")++;
    } else if (a >= 1200 && 1599 >= a) {
      map.at("aqua")++;
    } else if (a >= 1600 && 1999 >= a) {
      map.at("blue")++;
    } else if (a >= 2000 && 2399 >= a) {
      map.at("yellow")++;
    } else if (a >= 2400 && 2799 >= a) {
      map.at("orange")++;
    } else if (a >= 2800 && 3199 >= a) {
      map.at("red")++;
    } else {
      count++;
    }
  }
  int colors = 0;
  for (auto itr = map.begin(); itr != map.end(); itr++) {
    if (itr->second != 0) {
      colors++;
    }
  }
  if (colors != 8) {
    cout << colors << " " << colors + count << endl;
  } else {
    cout << colors << " " << colors << endl;
  }
}
