#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 color[9] = {};
  int border[9] = {4, 8, 12, 16, 20, 24, 28, 32, 50};
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 9; j++) {
      if (a[i] < border[j] * 100) {
        color[j]++;
        break;
      }
    }
  }
  int type = 0;
  for (int i = 0; i < 8; i++) {
    if (color[i] > 0) type++;
  }
  cout << max(1, type) << " ";
  cout << min(8, type + color[8]) << endl;
}
