#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  int gray, brown, green, cyan, blue, yellow, orange, red, free;
  gray = brown = green = cyan = blue = yellow = orange = red = free = 0;
  for (int i = 0; i < N; i++) {
    int rate = a[i];
    if (rate < 400)
      gray++;
    else if (rate < 800)
      brown++;
    else if (rate < 1200)
      green++;
    else if (rate < 1600)
      cyan++;
    else if (rate < 2000)
      blue++;
    else if (rate < 2400)
      yellow++;
    else if (rate < 2800)
      orange++;
    else if (rate < 3200)
      red++;
    else
      free++;
  }
  vector<bool> colors = {(bool)gray, (bool)brown,  (bool)green,  (bool)cyan,
                         (bool)blue, (bool)yellow, (bool)orange, (bool)red};
  int ans;
  ans = 0;
  for (int i = 0; i < 8; i++) {
    if (colors[i]) ans++;
  }
  int ansmax = ans;
  if (ans < 8) ansmax += min(free, 8 - ansmax);
  cout << ans << " " << ansmax << endl;
}
