#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long int n, m;
  cin >> n;
  m = n;
  long long int high = 0;
  long long int gray = 0;
  long long int brown = 0;
  long long int green = 0;
  long long int cyan = 0;
  long long int blue = 0;
  long long int yellow = 0;
  long long int orange = 0;
  long long int red = 0;
  while (m--) {
    long long int tmp;
    cin >> tmp;
    if (tmp < 400)
      gray++;
    else if (tmp < 800)
      brown++;
    else if (tmp < 1200)
      green++;
    else if (tmp < 1600)
      cyan++;
    else if (tmp < 2000)
      blue++;
    else if (tmp < 2400)
      yellow++;
    else if (tmp < 2800)
      orange++;
    else if (tmp < 3200)
      red++;
    else
      high++;
  }
  long long int a1 = !!gray + !!brown + !!green + !!cyan + !!blue + !!yellow +
                     !!orange + !!red;
  cout << a1 << " " << a1 + high;
}
