#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pl = pair<ll, ll>;
const ll MOD = 1000000007;
const ll MOD9 = 998244353;
const int inf = 1e9;
const ll INF = 4e18;
const ll dy[4] = {1, 0, -1, 0};
const ll dx[4] = {0, -1, 0, 1};
int main() {
  ll N;
  cin >> N;
  vl vec(N);
  for (ll i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  vector<char> aa(N);
  for (ll i = 0; i < N; i++) {
    if (vec.at(i) < 400) {
      aa.at(i) = 'a';
    } else if (vec.at(i) < 800) {
      aa.at(i) = 'b';
    } else if (vec.at(i) < 1200) {
      aa.at(i) = 'c';
    } else if (vec.at(i) < 1600) {
      aa.at(i) = 'd';
    } else if (vec.at(i) < 2000) {
      aa.at(i) = 'e';
    } else if (vec.at(i) < 2400) {
      aa.at(i) = 'f';
    } else if (vec.at(i) < 2800) {
      aa.at(i) = 'g';
    } else if (vec.at(i) < 3200) {
      aa.at(i) = 'h';
    } else if (vec.at(i) >= 3200) {
      aa.at(i) = 'X';
    }
  }
  ll count = 0;
  for (ll i = 0; i < N; i++) {
    if (aa.at(i) == 'X') {
      count++;
    }
  }
  vector<int> vecto(8);
  for (ll i = 0; i < N; i++) {
    if (aa.at(i) == 'a') {
      vecto.at(0)++;
    }
    if (aa.at(i) == 'b') {
      vecto.at(1)++;
    }
    if (aa.at(i) == 'c') {
      vecto.at(2)++;
    }
    if (aa.at(i) == 'd') {
      vecto.at(3)++;
    }
    if (aa.at(i) == 'e') {
      vecto.at(4)++;
    }
    if (aa.at(i) == 'f') {
      vecto.at(5)++;
    }
    if (aa.at(i) == 'g') {
      vecto.at(6)++;
    }
    if (aa.at(i) == 'h') {
      vecto.at(7)++;
    }
  }
  sort((vecto).begin(), (vecto).end());
  ll z = 0;
  for (ll i = 0; i < 8; i++) {
    if (vecto.at(i) != 0) {
      z++;
    }
  }
  if (z == 8) {
    cout << z << " " << z << endl;
  }
  if ((z != 8) && (count == 0)) {
    cout << z << " " << z << endl;
  }
  if ((z != 8) && (count != 0)) {
    cout << z << " " << z + min(count, 8 - z) << endl;
  }
}
