#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  set<string> color_selection;
  int rainbow = 0;
  for (int i = 0; i < N; i++) {
    int score;
    cin >> score;
    if (1 <= score && score < 400)
      color_selection.insert("gray");
    else if (400 <= score && score < 800)
      color_selection.insert("brown");
    else if (800 <= score && score < 1200)
      color_selection.insert("green");
    else if (1200 <= score && score < 1600)
      color_selection.insert("skyblue");
    else if (1600 <= score && score < 2000)
      color_selection.insert("blue");
    else if (2000 <= score && score < 2400)
      color_selection.insert("yellow");
    else if (2400 <= score && score < 2800)
      color_selection.insert("orange");
    else if (2800 <= score && score < 3200)
      color_selection.insert("red");
    else
      rainbow++;
  }
  cout << color_selection.size() << " " << color_selection.size() + rainbow
       << endl;
  return 0;
}
