#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  set<string> cores;
  int cont3200 = 0;
  vector<string> ratings = {"green", "brown",  "green",  "cyan",
                            "blue",  "yellow", "orange", "red"};
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    a /= 400;
    if (a >= 3200 / 400)
      cont3200++;
    else
      cores.insert(ratings[a]);
  }
  cout << max(1, (int)cores.size()) << " "
       << min((int)ratings.size(), (int)cores.size() + cont3200) << endl;
  return 0;
}
