#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, min = 0, max = 0, iro[8] = {};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> t;
    if (399 >= t && iro[0] == 0) {
      min++;
      max++;
      iro[0]++;
    } else if (799 >= t && iro[1] == 0) {
      min++;
      max++;
      iro[1]++;
    } else if (1199 >= t && iro[2] == 0) {
      min++;
      max++;
      iro[2]++;
    } else if (1599 >= t && iro[3] == 0) {
      min++;
      max++;
      iro[3]++;
    } else if (1999 >= t && iro[4] == 0) {
      min++;
      max++;
      iro[4]++;
    } else if (2399 >= t && iro[5] == 0) {
      min++;
      max++;
      iro[5]++;
    } else if (2799 >= t && iro[6] == 0) {
      min++;
      max++;
      iro[6]++;
    } else if (3199 >= t && iro[7] == 0) {
      min++;
      max++;
      iro[7]++;
    } else if (3200 <= t) {
      max++;
      if (min == 0) min++;
    }
  }
  if (max >= 8) max = 8;
  printf("%d %d", min, max);
  return 0;
}
