#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<string, int> counter;
  int exception = 0;
  for (int i = 0; i < n; i++) {
    int rate;
    cin >> rate;
    if (rate < 400)
      counter["gray"]++;
    else if (rate < 800)
      counter["brown"]++;
    else if (rate < 1200)
      counter["green"]++;
    else if (rate < 1600)
      counter["skyBlue"]++;
    else if (rate < 2000)
      counter["blue"]++;
    else if (rate < 2400)
      counter["yellow"]++;
    else if (rate < 2800)
      counter["orange"]++;
    else if (rate < 3200)
      counter["red"]++;
    else
      exception++;
  }
  int colors = counter.size();
  cout << colors << endl;
  if (colors + exception > 8)
    cout << 8 << endl;
  else
    cout << colors + exception << endl;
}
