#include <bits/stdc++.h>
using namespace std;
map<string, int> a;
int xx, yy;
string s[8] = {"hui", "zong", "lv", "qing", "lan", "huang", "cheng", "hong"};
int main() {
  int n;
  scanf("%d", &n);
  bool ok = 0;
  for (int i = 1, x; i <= n; i++) {
    scanf("%d", &x);
    if (x < 400) {
      a["hui"]++;
      continue;
    }
    if (x < 800) {
      a["zong"]++;
      continue;
    }
    if (x < 1200) {
      a["lv"]++;
      continue;
    }
    if (x < 1600) {
      a["qing"]++;
      continue;
    }
    if (x < 2000) {
      a["lan"]++;
      continue;
    }
    if (x < 2400) {
      a["huang"]++;
      continue;
    }
    if (x < 2800) {
      a["cheng"]++;
      continue;
    }
    if (x < 3200) {
      a["hong"]++;
      continue;
    }
    if (x >= 3200) {
      a["orz"]++;
      ok = 1;
      continue;
    }
  }
  for (int i = 0; i < 7; ++i) xx += a[s[i]] != 0, yy += a[s[i]] != 0;
  if (ok && xx == 0) xx = 1, yy = a["orz"];
  if (ok && xx > 0) yy += a["orz"];
  printf("%d %d\n", xx, yy);
  return 0;
}
