#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  map<string, long long> m;
  for (int i = 0; i < n; i++) {
    if (a[i] >= 3200) {
      m["other"]++;
    } else if (a[i] >= 2800) {
      m["red"]++;
    } else if (a[i] >= 2400) {
      m["daidai"]++;
    } else if (a[i] >= 2000) {
      m["yellow"]++;
    } else if (a[i] >= 1600) {
      m["blue"]++;
    } else if (a[i] >= 1200) {
      m["sky"]++;
    } else if (a[i] >= 800) {
      m["green"]++;
    } else if (a[i] >= 400) {
      m["cha"]++;
    } else {
      m["gray"]++;
    }
  }
  long long cnt = 0;
  for (auto v : m) {
    if (v.first != "other") {
      cnt++;
    }
  }
  long long mx = min(cnt + m["other"], 8LL);
  if (cnt == 0) cnt = 1;
  cout << cnt << " " << mx << endl;
}
