#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
static constexpr int mod = (int)1e9 + 7;
static constexpr int inf = 100100100;
static constexpr ll linf = 1e18;
static constexpr double eps = 1e-9;
static constexpr double pi = 3.14159265359;
int main() {
  ll N;
  cin >> N;
  map<char, ll> M;
  for (ll i = 0; i < N; ++i) {
    ll a;
    cin >> a;
    if (a <= 399) {
      ++M['g'];
    } else if (a <= 799) {
      ++M['b'];
    } else if (a <= 1199) {
      ++M['G'];
    } else if (a <= 1599) {
      ++M['s'];
    } else if (a <= 1999) {
      ++M['b'];
    } else if (a <= 2399) {
      ++M['y'];
    } else if (a <= 2799) {
      ++M['o'];
    } else if (a <= 3199) {
      ++M['r'];
    } else {
      ++M['x'];
    }
  }
  ll cnt = 0;
  for (auto it : M) {
    if (it.first == 'x') continue;
    ++cnt;
  }
  if (cnt == 0) {
    ll amin = 1;
    ll amax = M['x'];
    cout << amin << ' ' << amax << endl;
  } else {
    ll amin = cnt;
    ll amax = cnt + M['x'];
    cout << amin << ' ' << amax << endl;
  }
}
