#include <bits/stdc++.h>
using namespace std;
void solve(long long N, std::vector<long long> a) {
  vector<long long> vec;
  long long legend = 0;
  for (long long i = 0, i_len = (N); i < i_len; ++i) {
    if (a[i] >= 3200) legend++;
  }
  for (int i = 1; i <= 8; i++) {
    long long count = 0;
    for (long long j = 0, j_len = (N); j < j_len; ++j) {
      if (((i - 1) * 400) <= a[j] && a[j] < (i * 400)) {
        count++;
        break;
      }
    }
    if (count != 0) vec.push_back(count);
  }
  long long ans1 = vec.size();
  long long ans = vec.size() + legend;
  cout << max(legend, ans1) << " " << min(8ll, ans) << endl;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> a(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &a[i]);
  }
  solve(N, std::move(a));
  return 0;
}
