#include <bits/stdc++.h>
using namespace std;
int A[10], B[10];
int main() {
  int n, a, cnt = 0, cnt2 = 0;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (1 <= a && a <= 399)
      A[0]++;
    else if (400 <= a && a <= 799)
      A[1]++;
    else if (800 <= a && a <= 1199)
      A[2]++;
    else if (1200 <= a && a <= 1599)
      A[3]++;
    else if (1600 <= a && a <= 1999)
      A[4]++;
    else if (2000 <= a && a <= 2399)
      A[5]++;
    else if (2400 <= a && a <= 2799)
      A[6]++;
    else if (2800 <= a && a <= 3199)
      A[7]++;
    else
      v.push_back(a);
  }
  for (int i = 0; i < 10; i++) {
    B[i] = A[i];
  }
  for (int i = 0; i < v.size(); i++) {
    for (int i = 0; i < 8; i++) {
      if (A[i] == 0) {
        A[i]++;
        break;
      }
    }
    bool ok = true;
    for (int i = 0; i < 8; i++) {
      if (B[i]) ok = false;
    }
    if (!ok) continue;
    for (int i = 0; i < 8; i++) {
      if (B[i] == 0) {
        B[i]++;
        break;
      }
    }
  }
  for (int i = 0; i < 8; i++) {
    if (A[i]) cnt++;
    if (B[i]) cnt2++;
  }
  cout << cnt2 << " " << cnt << endl;
  return 0;
}
