#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
string rate_to_color(int rate) {
  if (rate < 400) {
    return "gray";
  } else if (rate < 800) {
    return "brown";
  } else if (rate < 1200) {
    return "green";
  } else if (rate < 1600) {
    return "cyan";
  } else if (rate < 2000) {
    return "blue";
  } else if (rate < 2400) {
    return "yellow";
  } else if (rate < 2800) {
    return "orange";
  } else if (rate < 3200) {
    return "red";
  } else {
    return "silver";
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  map<string, int> mp;
  for (auto &e : a) {
    ++mp[rate_to_color(e)];
  }
  const int num_silver = mp.count("silver") == 0 ? 0 : mp["silver"];
  if (num_silver == n or num_silver == 0) {
    cout << mp.size() << " " << mp.size() << endl;
  } else {
    const int mini = mp.size() - num_silver;
    cout << "mini"
         << " = " << (mini) << endl;
    ;
    cout << "num_silver"
         << " = " << (num_silver) << endl;
    ;
    cout << mini << " ";
    cout << mini + num_silver << endl;
  }
}
