#include <bits/stdc++.h>
using namespace std;
int N;
int a[100];
int main() {
  cin >> N;
  for (int i = 0; i < (N); ++i) cin >> a[i];
  map<string, int> mp;
  int 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["lightblue"]++;
    } else if (a[i] <= 1999) {
      mp["blue"]++;
    } else if (a[i] <= 2399) {
      mp["yellow"]++;
    } else if (a[i] <= 2799) {
      mp["orange"]++;
    } else if (a[i] <= 3199) {
      mp["red"]++;
    } else {
      free++;
    }
  }
  string t[] = {"gray", "brown",  "green",  "lightblue",
                "blue", "yellow", "orange", "red"};
  int base = 0;
  int new_color = 0;
  for (int i = 0; i < 8; i++) {
    if (mp.count(t[i])) {
      base++;
    } else if (free > 0) {
      free--;
      new_color++;
    }
  }
  printf("%d %d\n", max(base, new_color), base + new_color);
}
