#include <bits/stdc++.h>
using namespace std;
int band[8][2] = {
    {1, 399},     {400, 799},   {800, 1199},  {1200, 1599},
    {1600, 1999}, {2000, 2399}, {2400, 2799}, {2800, 3199},
};
int main(void) {
  int color[8] = {0}, other = 0, ansmin, ansmax;
  int n, a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (3200 <= a)
      other++;
    else
      for (int j = 0; j < 8; j++) {
        if (band[j][0] <= a && a <= band[j][1]) {
          color[j] = 1;
          break;
        }
      }
  }
  ansmin = min(1, accumulate(color, color + 8, 0));
  ansmax = min(ansmin + other, 8);
  cout << ansmin << " " << ansmax << endl;
  return 0;
}
