#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
void solve() {
  std::ifstream in("./sample.txt");
  std::cin.rdbuf(in.rdbuf());
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (size_t i = (0); i < (n); ++i) cin >> a[i];
  sort((a).begin(), (a).end());
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long now = a[i];
    if (now < 400) {
      mp[400]++;
    } else if (now < 800) {
      mp[800]++;
    } else if (now < 1200) {
      mp[1200]++;
    } else if (now < 1600) {
      mp[1600]++;
    } else if (now < 2000) {
      mp[2000]++;
    } else if (now < 2400) {
      mp[2400]++;
    } else if (now < 2800) {
      mp[2800]++;
    } else if (now < 3200) {
      mp[3200]++;
    } else {
      mp[-1]++;
    }
  }
  long long minans = INF;
  long long maxans = -INF;
  long long typesnum = 8;
  long long mpSize = 0;
  for (auto v : mp) mpSize += (v.second) ? 1 : 0;
  if (mp[-1] > 0) {
    if (mp.size() == 1) {
      minans = mpSize + 1;
      maxans = min(mp[-1], typesnum);
    } else {
      minans = mpSize;
      long long tmp = mpSize + mp[-1] - 1;
      maxans = min(tmp, typesnum);
    }
  } else {
    minans = mpSize;
    maxans = mpSize;
  }
  cout << minans << " " << maxans << endl;
}
signed main() {
  solve();
  return 0;
}
