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