#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0, rem = 0;
  cin >> n;
  map<string, int> map;
  for (size_t i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    if (tmp <= 399) {
      if (map.find("灰") == map.end()) {
        map.insert(make_pair("灰", 1));
        count++;
      }
    } else if (tmp <= 799) {
      if (map.find("茶") == map.end()) {
        map.insert(make_pair("茶", 1));
        count++;
      }
    } else if (tmp <= 1199) {
      if (map.find("緑") == map.end()) {
        map.insert(make_pair("緑", 1));
        count++;
      }
    } else if (tmp <= 1599) {
      if (map.find("水") == map.end()) {
        map.insert(make_pair("水", 1));
        count++;
      }
    } else if (tmp <= 1999) {
      if (map.find("青") == map.end()) {
        map.insert(make_pair("青", 1));
        count++;
      }
    } else if (tmp <= 2399) {
      if (map.find("黄") == map.end()) {
        map.insert(make_pair("黄", 1));
        count++;
      }
    } else if (tmp <= 2799) {
      if (map.find("橙") == map.end()) {
        map.insert(make_pair("橙", 1));
        count++;
      }
    } else if (tmp <= 3199) {
      if (map.find("赤") == map.end()) {
        map.insert(make_pair("赤", 1));
        count++;
      }
    } else {
      rem++;
    }
  }
  int count2 = count;
  for (; rem > 0;) {
    if (count2 < 8) {
      count2++;
      rem--;
    } else {
      break;
    }
  }
  cout << count << " " << count2 << endl;
}
