#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
long long N;
vector<long long> a;
int main() {
  cin >> N;
  a.resize(N);
  for (int i = 0; i < (N); ++i) cin >> a[i];
  map<string, long long> mp;
  long long free = 0;
  for (int i = 0; i < (N); ++i) {
    if (a[i] <= 399) {
      mp["gray"]++;
    } else if (a[i] <= 799) {
      mp["brown"]++;
    } else if (a[i] <= 1199) {
      mp["green"]++;
    } else if (a[i] <= 1599) {
      mp["mizu"]++;
    } else if (a[i] <= 1999) {
      mp["ao"]++;
    } else if (a[i] <= 2399) {
      mp["ki"]++;
    } else if (a[i] <= 2799) {
      mp["dai"]++;
    } else if (a[i] <= 3199) {
      mp["red"]++;
    } else {
      free++;
    }
  }
  long long min_v = mp.size();
  if (min_v == 0 && free > 0) {
    min_v = 1;
  }
  long long max_v =
      max((long long)mp.size(), min((long long)mp.size() + free, 8LL));
  cout << min_v << " " << max_v << endl;
}
