#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int sum;
  while (cin >> n) {
    sum = 0;
    int a[n];
    int is[9] = {0};
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
      if (a[i] >= 1 && a[i] <= 399) {
        is[0] = 1;
      } else if (a[i] >= 400 && a[i] <= 799) {
        is[1] = 1;
      } else if (a[i] >= 800 && a[i] <= 1199) {
        is[2] = 1;
      } else if (a[i] >= 1200 && a[i] <= 1599) {
        is[3] = 1;
      } else if (a[i] >= 1600 && a[i] <= 1999) {
        is[4] = 1;
      } else if (a[i] >= 2000 && a[i] <= 2399) {
        is[5] = 1;
      } else if (a[i] >= 2400 && a[i] <= 2799) {
        is[6] = 1;
      } else if (a[i] >= 2800 && a[i] <= 3199) {
        is[7] = 1;
      } else if (a[i] >= 3200) {
        is[8] += 1;
      }
    }
    if (is[8] == 0) {
      for (int i = 0; i < 8; i++) {
        if (is[i] == 1) {
          sum++;
        }
      }
      cout << sum << " " << sum << endl;
    } else {
      for (int i = 0; i < 8; i++) {
        if (is[i] == 1) {
          sum++;
        }
      }
      if (sum + is[8] > 8) {
        cout << sum << " " << 8 << endl;
      } else {
        cout << sum << " " << sum + is[8] << endl;
      }
    }
  }
  return 0;
}
