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