#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  map<string, int> M;
  bool frag = false;
  for (int i = 0; i < N; ++i) {
    int a;
    cin >> a;
    if (a <= 399)
      ++M["hai"];
    else if (a <= 799)
      ++M["tya"];
    else if (a <= 1199)
      ++M["midori"];
    else if (a <= 1599)
      ++M["mizu"];
    else if (a <= 1999)
      ++M["ao"];
    else if (a <= 2399)
      ++M["ki"];
    else if (a <= 2799)
      ++M["daidai"];
    else if (a <= 3199)
      ++M["aka"];
    else
      ++M["sugoi"];
  }
  int ans = 0;
  for (auto p : M) {
    if (p.first != "sugoi") {
      ++ans;
    }
  }
  cout << ans << " " << ans + M["sugoi"] << endl;
}
