#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int b;
  int gray, brown, green, water, blue, yellow, orange, red, over;
  gray = brown = green = water = blue = yellow = orange = red = over = 0;
  cin >> b;
  long long int rates[b];
  for (long long int i = 0; i < b; i++) {
    cin >> rates[i];
  }
  for (long long int i = 0; i < b; i++) {
    if (rates[i] < 400) {
      gray = 1;
    } else if (rates[i] < 800) {
      brown = 1;
    } else if (rates[i] < 1200) {
      green = 1;
    } else if (rates[i] < 1600) {
      water = 1;
    } else if (rates[i] < 2000) {
      blue = 1;
    } else if (rates[i] < 2400) {
      yellow = 1;
    } else if (rates[i] < 2800) {
      orange = 1;
    } else if (rates[i] < 3200) {
      red = 1;
    } else {
      over++;
    }
  }
  cout << min(gray + brown + green + water + blue + yellow + orange + red, 1)
       << " ";
  cout << min(8, gray + brown + green + water + blue + yellow + orange + red +
                     over)
       << endl;
}
