#include <bits/stdc++.h>
const long long int Z = 1000000007;
const long long int INF = 1 << 30;
int flag = 0;
using ll = long long;
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
  ll g = gcd(a, b);
  return a / g * b;
}
int main() {
  int n, b[100] = {0}, sum = 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;
      sum += 1;
    }
  }
  if (sum == 0) {
    int ans = 0;
    for (int i = 0; i < 8; i++) {
      if (b[i] != 0) {
        ans += 1;
      }
    }
    std::cout << ans << ' ' << ans << std::endl;
  } else {
    int min = 0, max = 0, nSum = 0;
    for (int i = 0; i < 8; i++) {
      if (b[i] == 0) {
        nSum += 1;
      } else {
        max += 1;
        min += 1;
      }
    }
    if (b[8] > nSum) {
      max = 8;
    } else {
      max += b[8];
    }
    std::cout << min << ' ' << max << std::endl;
  }
  return 0;
}
