#include <bits/stdc++.h>
int N;
int a[100 + 1];
int GRAY = 399;
int BROWN = 799;
int GREEN = 1199;
int SKYBLUE = 1599;
int BLUE = 1999;
int YELLOW = 2399;
int ORANGE = 2799;
int RED = 3199;
int color[8] = {399, 799, 1199, 1599, 1999, 2399, 2799, 3199};
int hitFrag[8] = {};
void solve() {
  std::cin >> N;
  int colorCount = 0;
  int multiColorCount = 0;
  int i;
  for (i = 1; i < N + 1; i++) {
    std::cin >> a[i];
    int cFlag = 0;
    for (int cind = 0; cind < 8; cind++) {
      if (a[i] <= color[cind]) {
        if (!hitFrag[cind]) {
          colorCount++;
          hitFrag[cind] = 1;
        }
        cFlag = 1;
        break;
      }
    }
    if (!cFlag) {
      multiColorCount++;
    }
  }
  int min;
  if (colorCount == 0 && multiColorCount != 0)
    min = 1;
  else
    min = 0;
  printf(
      "%d %d\n", min,
      ((colorCount + multiColorCount) < 8 ? colorCount + multiColorCount : 8));
}
int main(int argc, const char* argv[]) {
  solve();
  return 0;
}
