#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < N; i++) cin >> A[i];
  map<string, long long> MIN;
  map<string, long long> MAX;
  vector<string> colors{"gray", "brown",  "green",  "cyan",
                        "blue", "yellow", "orange", "red"};
  long long fcolor = 0;
  for (long long i = 0; i < N; i++) {
    if (A[i] < 400) MIN["gray"]++;
    if (A[i] >= 400 && A[i] < 800) MIN["brown"]++;
    if (A[i] >= 800 && A[i] < 1200) MIN["green"]++;
    if (A[i] >= 1200 && A[i] < 1600) MIN["cyan"]++;
    if (A[i] >= 1600 && A[i] < 2000) MIN["blue"]++;
    if (A[i] >= 2000 && A[i] < 2400) MIN["yellow"]++;
    if (A[i] >= 2400 && A[i] < 2800) MIN["orange"]++;
    if (A[i] >= 2800 && A[i] < 3200) MIN["red"]++;
    if (A[i] >= 3200) fcolor++;
  }
  long long res = 0;
  for (string i : colors) {
    if (MIN[i]) res++;
  }
  cout << res << " " << res + fcolor << endl;
}
