#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, cnt = 0, tr = 0;
  cin >> n;
  bool b[10];
  for (long long i = 0; i < 8; i++) b[i] = false;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    if (a < 400)
      b[0] = true;
    else if (a < 800)
      b[1] = true;
    else if (a < 1200)
      b[2] = true;
    else if (a < 1600)
      b[3] = true;
    else if (a < 2000)
      b[4] = true;
    else if (a < 2400)
      b[5] = true;
    else if (a < 2800)
      b[6] = true;
    else if (a < 3200)
      b[7] = true;
    else
      cnt++;
  }
  for (long long i = 0; i < 8; i++) {
    if (b[i]) tr++;
  }
  long long ma = tr + cnt;
  long long mi;
  if (tr == 0)
    mi = 1;
  else if (cnt <= tr)
    mi = tr;
  else
    mi = cnt;
  cout << mi << " " << ma << endl;
}
