#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  vector<bool> color(8, false);
  for (long long i = 0; i < N; i++) cin >> A[i];
  sort(A.begin(), A.end());
  long long i = 0;
  long long cnt = 0;
  while (i <= N - 1) {
    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;
    } else {
      cnt++;
    }
    i++;
  }
  long long C = 0;
  for (long long i = 0; i < 8; i++) {
    if (color[i] == true) C++;
  }
  printf("%lld %lld", C, C + min(8 - C, cnt));
}
