#include <bits/stdc++.h>
using namespace std;
bool B[8] = {0};
void check(long N) {
  if (N <= 399)
    B[0] = 1;
  else if (N <= 799)
    B[1] = 1;
  else if (N <= 1199)
    B[2] = 1;
  else if (N <= 1599)
    B[3] = 1;
  else if (N <= 1999)
    B[4] = 1;
  else if (N <= 2399)
    B[5] = 1;
  else if (N <= 2799)
    B[6] = 1;
  else if (N <= 3199)
    B[7] = 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long N, A[1009];
  cin >> N;
  for (long i = 0; i < N; i++) cin >> A[i];
  sort(A, A + N);
  long i = 0;
  for (; i < N; i++)
    if (A[i] < 3200)
      check(A[i]);
    else
      break;
  long M = 0;
  for (long i = 0; i < 8; i++) {
    M += B[i];
  }
  long C = min(M + (N - i), 8l);
  if (M == 0 && N != 0) M = 1;
  cout << M << " " << C;
}
