#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  int count = 0;
  int check[8];
  int min = 0;
  for (int i = 0; i < 8; i++) {
    check[i] = 0;
  }
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 400) {
      check[0] = 1;
    }
    if (400 <= a[i] && a[i] < 800) {
      check[1] = 1;
    }
    if (800 <= a[i] && a[i] < 1200) {
      check[2] = 1;
    }
    if (1200 <= a[i] && a[i] < 1600) {
      check[3] = 1;
    }
    if (1600 <= a[i] && a[i] < 2000) {
      check[4] = 1;
    }
    if (2000 <= a[i] && a[i] < 2400) {
      check[5] = 1;
    }
    if (2400 <= a[i] && a[i] < 2800) {
      check[6] = 1;
    }
    if (2800 <= a[i] && a[i] < 3200) {
      check[7] = 1;
    }
    if (3200 <= a[i]) {
      count++;
    }
  }
  for (int k = 0; k < 8; k++) {
    min = min + check[k];
    count = check[k] + count;
  }
  if (min == 0) {
    if (count <= 8) {
      cout << "1"
           << " " << count << endl;
    } else {
      cout << "1"
           << " "
           << "8" << endl;
    }
  } else {
    if (count <= 8) {
      cout << min << " " << count << endl;
    } else {
      cout << min << " "
           << "8" << endl;
    }
  }
  return 0;
}
