#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  int count = 0;
  map<string, int> map;
  map["gray"] = 0;
  map["brown"] = 0;
  map["green"] = 0;
  map["skyblue"] = 0;
  map["blue"] = 0;
  map["yellow"] = 0;
  map["orange"] = 0;
  map["red"] = 0;
  map["over"] = 0;
  for (int i = 0; i < (int)(n); i++) {
    int x;
    cin >> x;
    if (x < 400)
      map["gray"] = 1;
    else if (x < 800)
      map["brown"] = 1;
    else if (x < 1200)
      map["green"] = 1;
    else if (x < 1600)
      map["skyblue"] = 1;
    else if (x < 2000)
      map["blue"] = 1;
    else if (x < 2400)
      map["yellow"] = 1;
    else if (x < 2800)
      map["orange"] = 1;
    else if (x < 3200)
      map["red"] = 1;
    else
      map["over"]++;
  }
  count = map.at("gray") + map.at("brown") + map.at("green") +
          map.at("skyblue") + map.at("blue") + map.at("yellow") +
          map.at("orange") + map.at("red");
  int MIN = count;
  while (count < 8 && map.at("over") > 0) {
    count++;
    map["over"]--;
  }
  cout << MIN << " " << count << endl;
}
