#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, P, G = 0, X = 0;
  cin >> N;
  vector<bool> C(8, false);
  for (int i = 0; i < N; i++) {
    cin >> P;
    if (P < 400)
      C.at(0) = true;
    else if (P < 800)
      C.at(1) = true;
    else if (P < 1200)
      C.at(2) = true;
    else if (P < 1600)
      C.at(3) = true;
    else if (P < 2000)
      C.at(4) = true;
    else if (P < 2400)
      C.at(5) = true;
    else if (P < 2800)
      C.at(6) = true;
    else if (P < 3200)
      C.at(7) = true;
    else
      G++;
  }
  for (int i = 0; i < 8; i++)
    if (C.at(i)) X++;
  cout << min(1, X) << " " << min(X + G, 8) << endl;
}
