#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N);
  int T[10] = {1, 399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 4800};
  int counter[9] = {0};
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    for (int j = 0; j < 9; j++) {
      if (A[i] >= T[j] && A[i] < T[j + 1]) counter[j]++;
    }
  }
  int num_non_zero = 0;
  for (int i = 0; i < 8; i++)
    if (counter[i] > 0) num_non_zero++;
  if (counter[8] == 0) {
    cout << num_non_zero << " " << num_non_zero << endl;
  } else {
    cout << num_non_zero << " "
         << num_non_zero + min((N - num_non_zero), counter[8]) << endl;
  }
}
