#include <bits/stdc++.h>
using namespace std;
const int gray = 399, brown = 799, green = 1199, lb = 1599, blue = 1999,
          yell = 2399, dai = 2799, red = 3199;
int n, col[9] = {};
int getmax() {
  int max = 0;
  for (int i = 0; i < 8; i++) {
    if (col[i]) max++;
  }
  max += col[8];
  return max > 8 ? 8 : max;
}
int getmin() {
  int min = 0;
  for (int i = 0; i < 8; i++) {
    if (col[i]) min++;
  }
  if (col[8] && !min) min = 1;
  return min;
}
int getCol(int a) {
  int r = 0;
  if (a > gray) r++;
  if (a > brown) r++;
  if (a > green) r++;
  if (a > lb) r++;
  if (a > blue) r++;
  if (a > yell) r++;
  if (a > dai) r++;
  if (a > red) r++;
  return r;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    col[getCol(a)]++;
  }
  cout << getmin() << " " << getmax() << endl;
  return 0;
}
