#include <bits/stdc++.h>
using namespace std;
string count_key(int num) {
  if (num < 3200 && num >= 2800) {
    return string("red");
  } else if (num < 2800 && num >= 2400) {
    return string("orange");
  } else if (num < 2400 && num >= 2000) {
    return string("yellow");
  } else if (num < 2000 && num >= 1600) {
    return string("blue");
  } else if (num < 1600 && num >= 1200) {
    return string("light_blue");
  } else if (num < 1200 && num >= 800) {
    return string("green");
  } else if (num < 800 && num >= 400) {
    return string("blown");
  } else if (num < 400 && num > 0) {
    return string("gray");
  }
}
int main() {
  int n;
  cin >> n;
  map<string, int> counter;
  string str;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int num;
    cin >> num;
    v.push_back(num);
  }
  int over_3200_num = 0;
  for (auto num : v) {
    if (num >= 3200) {
      over_3200_num += 1;
    } else {
      counter[count_key(num)] += 1;
    }
  }
  int color_num = 0;
  for (auto itr : counter) {
    color_num += 1;
  }
  cout << color_num << " " << color_num + over_3200_num << endl;
}
