#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int a[N];
  string s[8] = {"gray", "brown",  "green",  "rightblue",
                 "blue", "yellow", "orange", "red"};
  map<string, int> mp;
  for (int i = 0; i < N; i++) cin >> a[i];
  for (int i = 0; i < N; i++) {
    if (a[i] >= 1 && a[i] < 400) {
      mp["gray"]++;
    } else if (a[i] >= 400 && a[i] < 800) {
      mp["brown"]++;
    } else if (a[i] >= 800 && a[i] < 1200) {
      mp["green"]++;
    } else if (a[i] >= 1200 && a[i] < 1600) {
      mp["rightblue"]++;
    } else if (a[i] >= 1600 && a[i] < 2000) {
      mp["blue"]++;
    } else if (a[i] >= 2000 && a[i] < 2400) {
      mp["yellow"]++;
    } else if (a[i] >= 2400 && a[i] < 2800) {
      mp["orange"]++;
    } else if (a[i] >= 2800 && a[i] < 3200) {
      mp["red"]++;
    } else {
      mp["other"]++;
    }
  }
  int min = 0;
  for (int i = 0; i < 8; i++) {
    if (mp[s[i]] > 0) min++;
  }
  int max = min + mp["other"];
  cout << min << " " << max << "\n";
}
