#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a.at(i);
  }
  int gray = 0, blown = 0, green = 0, aqua = 0, blue = 0, yellow = 0,
      orange = 0, red = 0, anycolor = 0;
  int zero_count = 8;
  for (int i = 0; i < N; i++) {
    if (a.at(i) < 400) {
      if (gray == 0) {
        zero_count -= 1;
      }
      gray += 1;
    } else if (a.at(i) < 800) {
      if (blown == 0) {
        zero_count -= 1;
      }
      blown += 1;
    } else if (a.at(i) < 1200) {
      if (green == 0) {
        zero_count -= 1;
      }
      green += 1;
    } else if (a.at(i) < 1600) {
      if (aqua == 0) {
        zero_count -= 1;
      }
      aqua += 1;
    } else if (a.at(i) < 2000) {
      if (blue == 0) {
        zero_count -= 1;
      }
      blue += 1;
    } else if (a.at(i) < 2400) {
      if (yellow == 0) {
        zero_count -= 1;
      }
      yellow += 1;
    } else if (a.at(i) < 2800) {
      if (orange == 0) {
        zero_count -= 1;
      }
      orange += 1;
    } else if (a.at(i) < 3200) {
      if (red == 0) {
        zero_count -= 1;
      }
      red += 1;
    } else {
      anycolor += 1;
    }
  }
  int min_colors, max_colors;
  if (anycolor == 0) {
    min_colors = (8 - zero_count);
    max_colors = (8 - zero_count);
  } else if (anycolor == N) {
    min_colors = 1;
    if (N > 8) {
      max_colors = 8;
    } else {
      max_colors = anycolor;
    }
  } else {
    min_colors = (8 - zero_count);
    if (zero_count < anycolor) {
      max_colors = 8;
    } else {
      max_colors = 8 - zero_count + anycolor;
    }
  }
  cout << min_colors << " " << max_colors << endl;
}
