#include <bits/stdc++.h>
using namespace std;
void solve() {
  int N;
  cin >> N;
  bool color[8] = {false};
  vector<int> a(N);
  int redCoder = 0;
  for (int i = 0; i < N; ++i) {
    cin >> a[i];
    if (a[i] >= 3200) {
      ++redCoder;
      continue;
    }
    if (a[i] < 400) {
      color[0] = true;
    } else if (a[i] < 800) {
      color[1] = true;
    } else if (a[i] < 1200) {
      color[2] = true;
    } else if (a[i] < 1600) {
      color[3] = true;
    } else if (a[i] < 2000) {
      color[4] = true;
    } else if (a[i] < 2400) {
      color[5] = true;
    } else if (a[i] < 2800) {
      color[6] = true;
    } else if (a[i] < 3200) {
      color[7] = true;
    }
  }
  int minColor = 0;
  int maxColor = 0;
  for (int i = 0; i < 8; ++i) {
    if (color[i]) {
      ++minColor;
    }
  }
  maxColor = minColor + redCoder;
  cout << minColor << " " << maxColor << endl;
}
int main() {
  solve();
  return (0);
}
