#include <bits/stdc++.h>
using namespace std;
string color(int i) {
  if (1 <= i && i <= 399) return "Hai";
  if (400 <= i && i <= 799) return "cha";
  if (800 <= i && i <= 1199) return "mid";
  if (1200 <= i && i <= 1599) return "miz";
  if (1600 <= i && i <= 1999) return "aoi";
  if (2000 <= i && i <= 2399) return "kii";
  if (2400 <= i && i <= 2799) return "dai";
  if (2800 <= i && i <= 3199) return "aka";
  if (3200 <= i) return "free";
}
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int a = 0; a < N; a++) {
    cin >> A[a];
  }
  int free = 0;
  map<string, bool> colors;
  for (int a = 0; a < N; a++) {
    string str = color(A[a]);
    if (str == "free") {
      free++;
    } else {
      colors[str] = true;
    }
  }
  cout << colors.size() << " " << colors.size() + free << endl;
  return 0;
}
