#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  vector<int> a;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int in;
    cin >> in;
    a.push_back(in);
  }
  const int num_colors = 8;
  int min_colors[num_colors];
  int max_colors[num_colors];
  for (int i = 0; i < num_colors; i++) {
    min_colors[i] = 0;
    max_colors[i] = 0;
  }
  for (int i = 0; i < N; i++) {
    if (a[i] < 400) {
      min_colors[0] = 1;
      max_colors[0] = 1;
    } else if (a[i] < 800) {
      min_colors[1] = 1;
      max_colors[1] = 1;
    } else if (a[i] < 1200) {
      min_colors[2] = 1;
      max_colors[2] = 1;
    } else if (a[i] < 1600) {
      min_colors[3] = 1;
      max_colors[3] = 1;
    } else if (a[i] < 2000) {
      min_colors[4] = 1;
      max_colors[4] = 1;
    } else if (a[i] < 2400) {
      min_colors[5] = 1;
      max_colors[5] = 1;
    } else if (a[i] < 2800) {
      min_colors[6] = 1;
      max_colors[6] = 1;
    } else if (a[i] < 3200) {
      min_colors[7] = 1;
      max_colors[7] = 1;
    } else {
      for (int j = 0; j < num_colors; j++) {
        if (max_colors[j] == 0) {
          max_colors[j] = 1;
          break;
        }
      }
    }
  }
  int num_min_colors = 0;
  int num_max_colors = 0;
  for (int i = 0; i < num_colors; i++) {
    if (min_colors[i] > 0) {
      num_min_colors++;
    }
    if (max_colors[i] > 0) {
      num_max_colors++;
    }
  }
  cout << num_min_colors << " " << num_max_colors << endl;
  return 0;
}
