#include <bits/stdc++.h>
const long long int Z = 1000000007;
const long long int INF = 1 << 30;
const int V = 10;
struct edge {
  int to, cost;
};
std::vector<edge> v[100];
int main() {
  int n, b[9] = {0};
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    std::cin >> a;
    if (a < 400) {
      b[0] += 1;
    }
    if (400 <= a && a < 800) {
      b[1] += 1;
    }
    if (800 <= a && a < 1200) {
      b[2] += 1;
    }
    if (1200 <= a && a < 1600) {
      b[3] += 1;
    }
    if (1600 <= a && a < 2000) {
      b[4] += 1;
    }
    if (2000 <= a && a < 2400) {
      b[5] += 1;
    }
    if (2400 <= a && a < 2800) {
      b[6] += 1;
    }
    if (2800 <= a && a < 3200) {
      b[7] += 1;
    }
    if (3200 <= a) {
      b[8] += 1;
    }
  }
  int min = 0, max = 0, sum = 0;
  for (int i = 0; i < 8; i++) {
    if (b[i] != 0) {
      min += 1;
      max += 1;
    } else {
      sum += 1;
    }
  }
  if (b[8] != 0) {
    if (sum == 8) {
      min = 1;
      if (b[8] < 9)
        max = b[8];
      else
        max = 8;
    } else {
      while (true) {
        b[8] -= 1;
        if (b[8] < 0) break;
        sum -= 1;
        if (sum < 0) break;
        max += 1;
      }
    }
  }
  std::cout << min << ' ' << max << std::endl;
  return 0;
}
