#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long N;
  cin >> N;
  long long a[N];
  set<string> color;
  long long cnt = 0;
  for (long long i = 0; i < N; i++) {
    cin >> a[i];
    if (a[i] <= 399)
      color.insert("ash");
    else if (a[i] <= 799)
      color.insert("brown");
    else if (a[i] <= 1199)
      color.insert("green");
    else if (a[i] <= 1599)
      color.insert("lightblue");
    else if (a[i] <= 1999)
      color.insert("blue");
    else if (a[i] <= 2399)
      color.insert("yellow");
    else if (a[i] <= 2799)
      color.insert("orange");
    else if (a[i] <= 3199)
      color.insert("red");
    else
      cnt++;
  }
  cout << color.size() << " " << color.size() + cnt << endl;
  return 0;
}
