#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, min = 0, max = 0;
  bool seen = false;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    if (a[i] / 400 < 8 && !seen) {
      min++;
      seen = true;
    } else if (a[i] / 400 >= 8) {
      max++;
    }
  }
  cout << min << " " << min + max << endl;
}
