#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[8];
  int count = 0;
  for (int i = 0; i < 8; i++) a[i] = 0;
  for (int i = 0; i < n; i++) {
    int rate;
    cin >> rate;
    if (rate <= 399) {
      a[0]++;
    } else if (rate <= 799) {
      a[1]++;
    } else if (rate <= 1199) {
      a[2]++;
    } else if (rate <= 1599) {
      a[3]++;
    } else if (rate <= 1999) {
      a[4]++;
    } else if (rate <= 2399) {
      a[5]++;
    } else if (rate <= 2799) {
      a[6]++;
    } else if (rate <= 3199) {
      a[7]++;
    } else {
      count++;
    }
  }
  int empty = 0;
  for (int i = 0; i < 8; i++) {
    if (a[i] == 0) {
      empty++;
    }
  }
  if (count == 0 || empty == 0) {
    cout << 8 - empty << " " << 8 - empty << endl;
  } else if (count == n) {
    cout << 1 << " " << min(8, count) << endl;
  } else if (count >= 1) {
    if (empty == 0) {
      cout << 8 << " " << 8 << endl;
    } else {
      if (empty < count) {
        cout << 8 - empty << " " << 8 << endl;
      } else {
        cout << 8 - empty << " " << 8 - empty + count << endl;
      }
    }
  } else {
    if (empty <= count) {
      count = empty;
    }
    cout << 8 - empty << " " << 8 - empty + count << endl;
  }
}
