#include <bits/stdc++.h>
using namespace std;
static const int MAX = 100000;
int cunt, cunt0, color[9], a;
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a;
    if (a < 400)
      color[0]++;
    else if (a < 800)
      color[1]++;
    else if (a < 1200)
      color[2]++;
    else if (a < 1600)
      color[3]++;
    else if (a < 2000)
      color[4]++;
    else if (a < 2400)
      color[5]++;
    else if (a < 2800)
      color[6]++;
    else if (a < 3200)
      color[7]++;
    else
      color[8]++;
  }
  for (int i = 0; i < 8; i++) {
    if (color[i])
      cunt++;
    else
      cunt0++;
  }
  int min_cunt;
  if (color[7])
    min_cunt = cunt;
  else {
    if (cunt)
      min_cunt = cunt - 1;
    else
      min_cunt = 1;
  }
  int max_cunt;
  if (!color[8])
    max_cunt = cunt;
  else {
    if (cunt0 <= color[8])
      max_cunt = 7;
    else
      max_cunt = cunt + color[8];
  }
  cout << min_cunt << " " << max_cunt << "\n";
  return 0;
}
