#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 1e9;
int main() {
  int n;
  cin >> n;
  map<string, int> mp;
  for (int i = 0; i < (n); i++) {
    int a;
    cin >> a;
    if (a < 400)
      mp["g"]++;
    else if (a < 800)
      mp["br"]++;
    else if (a < 1200)
      mp["gre"]++;
    else if (a < 1600)
      mp["wa"]++;
    else if (a < 2000)
      mp["ble"]++;
    else if (a < 2400)
      mp["yel"]++;
    else if (a < 2800)
      mp["or"]++;
    else if (a < 3200)
      mp["red"]++;
    else
      mp["kamisama"]++;
  }
  int mi;
  int d = mp.size();
  if (mp["kamisama"]) {
    if (d == 1)
      mi = 1;
    else
      mi = d - 1;
  } else
    mi = d;
  int ma = mi + min(mp["kamisama"], 8 - mi);
  cout << mi << " " << ma << endl;
  return 0;
}
