#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, p, q;
  int temp = 0;
  int t = 0;
  int flag[8] = {0};
  string s;
  int k;
  cin >> n;
  int a[n];
  int maxkazu = 0;
  int minkazu = 0;
  for (i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (i = 0; i < n; ++i) {
    if (flag[0] == 0 && a[i] <= 399 && a[i] >= 1) {
      flag[0] = 1;
      temp = 1;
    }
    if (flag[1] == 0 && a[i] <= 799 && a[i] >= 400) {
      flag[1] = 1;
      temp = 1;
    }
    if (flag[2] == 0 && a[i] <= 1199 && a[i] >= 800) {
      flag[2] = 1;
      temp = 1;
    }
    if (flag[3] == 0 && a[i] <= 1599 && a[i] >= 1200) {
      flag[3] = 1;
      temp = 1;
    }
    if (flag[4] == 0 && a[i] <= 1999 && a[i] >= 1600) {
      flag[4] = 1;
      temp = 1;
    }
    if (flag[5] == 0 && a[i] <= 2399 && a[i] >= 2000) {
      flag[5] = 1;
      temp = 1;
    }
    if (flag[6] == 0 && a[i] <= 2799 && a[i] >= 2400) {
      flag[6] = 1;
      temp = 1;
    }
    if (flag[7] == 0 && a[i] <= 3199 && a[i] >= 2800) {
      flag[7] = 1;
      temp = 1;
    }
    if (a[i] >= 3200 && maxkazu <= 8) {
      maxkazu++;
    }
  }
  for (i = 0; i < 8; ++i) {
    if (flag[i] == 1 && maxkazu <= 8 && minkazu <= 8) {
      ++maxkazu;
      ++minkazu;
    }
  }
  if (temp == 0) {
    cout << 1 << " " << maxkazu;
  } else {
    cout << minkazu << " " << maxkazu;
  }
  return 0;
}
