#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  bool flag = false;
  int b, c, d, e, f, g, h, j, k, l;
  b = c = d = e = f = g = h = j = 0;
  for (int i = 0; i < (int)(N); i++) {
    cin >> a[i];
    if (a[i] < 400)
      b++;
    else if (a[i] < 800)
      c++;
    else if (a[i] < 1200)
      d++;
    else if (a[i] < 1600)
      c++;
    else if (a[i] < 2000)
      e++;
    else if (a[i] < 2400)
      f++;
    else if (a[i] < 2800)
      g++;
    else if (a[i] < 3200)
      h++;
    else
      j++;
  }
  if (b > 1) {
    b = 1;
    flag = true;
  }
  if (c > 1) {
    c = 1;
    flag = true;
  }
  if (d > 1) {
    d = 1;
    flag = true;
  }
  if (e > 1) {
    e = 1;
    flag = true;
  }
  if (f > 1) {
    f = 1;
    flag = true;
  }
  if (g > 1) {
    g = 1;
    flag = true;
  }
  if (h > 1) {
    h = 1;
    flag = true;
  }
  if (j > 0) {
    if (flag) {
      k = 0;
      l = j;
    } else {
      k = 1;
      l = j;
    }
  } else if (j == 0) {
    k = l = 0;
  }
  cout << b + c + d + e + f + g + h + k << " " << b + c + d + e + f + g + h + l
       << endl;
}
