#include <bits/stdc++.h>
using namespace std;
const long long int LL_INF = 1LL << 60;
vector<string> split(const string& input, char delimiter) {
  stringstream stream(input);
  string field;
  vector<string> result;
  while (getline(stream, field, delimiter)) {
    result.push_back(field);
  }
  return result;
}
long long int A, B, C, D, E, M, N, K, Q, W, H, T, X, Y;
int main() {
  cin >> N;
  int cnt = 0;
  vector<bool> color(8);
  for (int i = 0; i < N; ++i) {
    int in;
    cin >> in;
    if (1 <= in && in < 400)
      color[0] = true;
    else if (400 <= in && in < 800)
      color[1] = true;
    else if (800 <= in && in < 1200)
      color[2] = true;
    else if (1200 <= in && in < 1600)
      color[3] = true;
    else if (1600 <= in && in < 2000)
      color[4] = true;
    else if (2000 <= in && in < 2400)
      color[5] = true;
    else if (2400 <= in && in < 2800)
      color[6] = true;
    else if (2800 <= in && in < 3200)
      color[7] = true;
    else
      cnt++;
  }
  int cNum = 0;
  for (auto c : color)
    if (c) cNum++;
  cout << cNum << " " << cNum + cnt << endl;
  return 0;
}
