#include <bits/stdc++.h>
using namespace std;
std::vector<unsigned long long> genprimevec(const unsigned long long N);
void stat();
constexpr long long mod = 1000000000 + 7;
int main() {
  int n;
  cin >> n;
  std::vector<int> v(n);
  std::vector<int> tier{399, 799, 1199, 1599, 1999, 2399, 2799, 3199};
  std::vector<int> result(9, 0);
  for (unsigned long long i = 0; i < (unsigned long long)(n); ++i) {
    cin >> v[i];
  }
  for (unsigned long long i = 0; i < (unsigned long long)(n); ++i) {
    if (v[i] > tier[7]) {
      ++result[8];
      continue;
    }
    for (unsigned long long j = 0; j < (unsigned long long)(8); ++j) {
      if (tier[j] >= v[i]) {
        ++result[j];
        break;
      }
    }
  }
  long long ansmin = 0;
  for (unsigned long long i = 0; i < (unsigned long long)(8); ++i) {
    if (result[i]) {
      ++ansmin;
    }
  }
  long long ansmax;
  if (ansmin == 0) {
    ansmin = 1;
    ansmax = min(result[7], 8);
  }
  int rest = 8 - ansmin;
  ansmax = ansmin + min(rest, result[8]);
  cout << ansmin << ' ' << ansmax << endl;
  return 0;
}
long long extgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1, y = 0;
    return a;
  }
  long long d = extgcd(b, a % b, y, x);
  y -= a / b * x;
  return d;
}
std::vector<unsigned long long> genprimevec(const unsigned long long N) {
  std::vector<bool> is_prime(N + 1);
  for (unsigned long long i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<unsigned long long> P;
  for (unsigned long long i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (unsigned long long j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
void stat() {}
