#include <bits/stdc++.h>
const int MGN = 8;
const int ARY_SZ_MAX = 10000000;
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vd = vector<double>;
using vs = vector<string>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using psi = pair<string, int>;
int main() {
  std::cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vi A(N);
  for (int i = int(0); i < int(N); ++i) cin >> A[i];
  map<string, int> mp;
  for (int i = int(0); i < int(N); ++i) {
    if (1 <= A[i] && A[i] <= 399) {
      mp["gray"]++;
    } else if (400 <= A[i] && A[i] <= 799) {
      mp["brown"]++;
    } else if (800 <= A[i] && A[i] <= 1199) {
      mp["green"]++;
    } else if (1200 <= A[i] && A[i] <= 1599) {
      mp["light_blue"]++;
    } else if (1600 <= A[i] && A[i] <= 1999) {
      mp["blue"]++;
    } else if (2000 <= A[i] && A[i] <= 2399) {
      mp["yellow"]++;
    } else if (2400 <= A[i] && A[i] <= 2799) {
      mp["orange"]++;
    } else if (2800 <= A[i] && A[i] <= 3199) {
      mp["red"]++;
    } else if (3200 <= A[i]) {
      mp["super"]++;
    }
  }
  int lo = 0;
  int hi;
  for (auto p : mp) {
    lo++;
  }
  if (mp.count("super") > 0) {
    lo--;
    hi = lo + mp["super"];
  } else {
    hi = lo;
  }
  cout << lo << " " << hi << endl;
  return 0;
}
