#include <bits/stdc++.h>
using namespace std;
const long long mei = (long long)1e9 + 7;
int main() {
  long long a, b, c, d, e, f, g, h, n, k, m;
  a = 0;
  b = 0;
  c = 0;
  d = 0;
  e = 0;
  f = 0;
  g = 0;
  h = 0;
  k = 0;
  cin >> n;
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> m;
    if (m < 400)
      a = 1;
    else if (m < 800)
      b = 1;
    else if (m < 1200)
      c = 1;
    else if (m < 1600)
      d = 1;
    else if (m < 2000)
      e = 1;
    else if (m < 2400)
      f = 1;
    else if (m < 2800)
      g = 1;
    else if (m < 3200)
      h = 1;
    else
      k++;
  }
  if (k >= 1) {
    cout << min(a + b + c + d + e + f + g + h + k, 8ll);
    cout << endl;
    cout << max(1ll, a + b + c + d + e + f + g + h);
    cout << endl;
  } else {
    for (long long i = 0; i < (long long)(2); i++) {
      cout << a + b + c + d + e + f + g + h;
      cout << endl;
    }
  }
}
