#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int pro = 0;
  bool gray = false;
  bool brown = false;
  bool green = false;
  bool water = false;
  bool blue = false;
  bool yellow = false;
  bool orange = false;
  bool red = false;
  for (int i = 0; i < N; i++) {
    int test = 0;
    cin >> test;
    if (test < 400) {
      gray = true;
      continue;
    }
    if (test < 800) {
      brown = true;
      continue;
    }
    if (test < 1200) {
      green = true;
      continue;
    }
    if (test < 1600) {
      water = true;
      continue;
    }
    if (test < 2000) {
      blue = true;
      continue;
    }
    if (test < 2400) {
      yellow = true;
      continue;
    }
    if (test < 2800) {
      orange = true;
      continue;
    }
    if (test < 3200) {
      red = true;
      continue;
    } else {
      pro++;
      continue;
    }
  }
  int color = 0;
  if (gray) color++;
  if (brown) color++;
  if (green) color++;
  if (water) color++;
  if (blue) color++;
  if (yellow) color++;
  if (orange) color++;
  if (red) color++;
  cout << color << " " << color + pro << endl;
}
