#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, color = 0, count = 0;
  bool colorful[8] = {false};
  cin >> N;
  for (int i = 0; i < N; i++) {
    int x;
    cin >> x;
    if (x >= 3200) color++;
    if (x <= 399)
      colorful[0] = true;
    else if (x <= 799)
      colorful[1] = true;
    else if (x <= 1199)
      colorful[1] = true;
    else if (x <= 1599)
      colorful[2] = true;
    else if (x <= 1999)
      colorful[3] = true;
    else if (x <= 2399)
      colorful[4] = true;
    else if (x <= 2799)
      colorful[5] = true;
    else if (x <= 3199)
      colorful[6] = true;
  }
  for (int i = 0; i < 7; i++) count += colorful[i];
  cout << count << " " << count + color << endl;
  return 0;
}
