#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long maxx(long long x, long long y, long long z) {
  return max(max(x, y), z);
}
long long minn(long long x, long long y, long long z) {
  return min(min(x, y), z);
}
long long gcd(long long x, long long y) {
  if (x % y == 0)
    return y;
  else
    return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return x * (y / gcd(x, y)); }
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++;
  }
  cout << C << endl;
  cout << C + min(8 - C, cnt);
}
