#include <bits/stdc++.h>
long long int a[1000000 + 9];
using namespace std;
int main() {
  long long int n, i, j, x = 0, c = 0;
  cin >> n;
  map<string, long long int> m;
  map<string, int>::iterator it;
  m.insert(make_pair("gray", 0));
  m.insert(make_pair("green", 0));
  m.insert(make_pair("cyan", 0));
  m.insert(make_pair("blue", 0));
  m.insert(make_pair("yellow", 0));
  m.insert(make_pair("orange", 0));
  m.insert(make_pair("red", 0));
  m.insert(make_pair("brown", 0));
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] >= 1 && a[i] <= 399) {
      m["gray"]++;
    } else if (a[i] >= 400 && a[i] <= 799) {
      m["brown"]++;
    } else if (a[i] >= 800 && a[i] <= 1199) {
      m["green"]++;
    } else if (a[i] >= 1200 && a[i] <= 1599) {
      m["cyan"]++;
    } else if (a[i] >= 1600 && a[i] <= 1999) {
      m["blue"]++;
    } else if (a[i] >= 2000 && a[i] <= 2399) {
      m["yellow"]++;
    } else if (a[i] >= 2400 && a[i] <= 2799) {
      m["orange"]++;
    } else if (a[i] >= 2800 && a[i] <= 3199) {
      m["red"]++;
    } else if (a[i] >= 3200) {
      x++;
    }
  }
  if (m["gray"] >= 1) {
    c++;
  }
  if (m["brown"] >= 1) {
    c++;
  }
  if (m["green"] >= 1) {
    c++;
  }
  if (m["cyan"] >= 1) {
    c++;
  }
  if (m["blue"] >= 1) {
    c++;
  }
  if (m["yellow"] >= 1) {
    c++;
  }
  if (m["orange"] >= 1) {
    c++;
  }
  if (m["red"] >= 1) {
    c++;
  }
  cout << c << " ";
  if ((c + x) <= 8) {
    cout << c + x << endl;
  } else if ((c + x) > 8) {
    cout << 8 << endl;
  }
  return 0;
}
