#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 d = mp.size() + (mp["kamisama"] ? -1 : 0);
  int mi = d + (mp.size() == 1 ? 1 : 0);
  int ma = d + min(mp["kamisama"], 8 - d);
  cout << mi << " " << ma << endl;
  return 0;
}
