#include <bits/stdc++.h>
using namespace std;
signed main() {
  bool grey, brown, green, lightblue, blue, yellow, orange, red;
  grey = brown = green = lightblue = blue = yellow = orange = red = false;
  long long N;
  long long special = 0;
  cin >> N;
  for (long long j = 0; j < N; j++) {
    long long i;
    cin >> i;
    if (i < 400) {
      grey = true;
    } else if (i < 800) {
      brown = true;
    } else if (i < 1200) {
      green = true;
    } else if (i < 1600) {
      lightblue = true;
    } else if (i < 2000) {
      blue = true;
    } else if (i < 2400) {
      yellow = true;
    } else if (i < 2800) {
      orange = true;
    } else if (i < 3200) {
      red = true;
    } else
      special++;
  }
  long long color = 0;
  if (grey) color++;
  if (brown) color++;
  if (green) color++;
  if (lightblue) color++;
  if (blue) color++;
  if (yellow) color++;
  if (orange) color++;
  if (red) color++;
  long long min, max;
  if (color == 0) {
    if (special > 0) {
      min = 0;
    } else {
      min = 0;
    }
  } else {
    min = color;
  }
  max = (color + special);
  cout << min << " " << max;
  return 0;
}
