#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> nCrMap(101, vector<int>(101, -1));
int nCr(int _n, int _r) {
  if (nCrMap[_n][_r] != -1) return nCrMap[_n][_r];
  if (_n == 0) return nCrMap[_n][_r] = 0;
  if (_r == 1 or _r == 0) return nCrMap[_n][_r] = 1;
  return nCrMap[_n][_r] = nCrMap[_n - _r][_r] =
             nCr(_n, _r - 1) + nCr(_n - 1, _r - 1);
}
int main() {
  int n;
  cin >> n;
  map<string, int> mp;
  int other = 0;
  vector<int> rate(100);
  for (int i = 0; i < n; i++) {
    cin >> rate[i];
    if (1 <= rate[i] and rate[i] <= 399) {
      mp["灰色"]++;
    } else if (400 <= rate[i] and rate[i] <= 799) {
      mp["茶色"]++;
    } else if (800 <= rate[i] and rate[i] <= 1199) {
      mp["緑色"]++;
    } else if (1200 <= rate[i] and rate[i] <= 1599) {
      mp["水色"]++;
    } else if (1600 <= rate[i] and rate[i] <= 1999) {
      mp["青色"]++;
    } else if (2000 <= rate[i] and rate[i] <= 2399) {
      mp["黄色"]++;
    } else if (2400 <= rate[i] and rate[i] <= 2799) {
      mp["橙色"]++;
    } else if (2800 <= rate[i] and rate[i] <= 3199) {
      mp["赤色"]++;
    } else {
      other++;
    }
  }
  if (other > 8) other = 8;
  if (other > 0) {
    cout << mp.size() << " " << mp.size() + nCr(8, other) << endl;
  } else {
    cout << mp.size() << " " << mp.size() << endl;
  }
  return 0;
}
