#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<string> a;
  int cnt = 0;
  string c;
  for (int i = 0; i < n; i++) {
    int b;
    cin >> b;
    if (b >= 3200) cnt++;
    if (b < 400) c = "gray";
    if (b >= 400 && b < 800) c = "brown";
    if (b >= 800 && b < 1200) c = "green";
    if (b >= 1200 && b < 1600) c = "sky";
    if (b >= 1600 && b < 2000) c = "blue";
    if (b >= 2000 && b < 2400) c = "yellow";
    if (b >= 2400 && b < 2800) c = "orange";
    if (b >= 2800 && b < 3200) c = "red";
    if (!(a.count(c))) a.insert(c);
  }
  cout << a.size() << " " << a.size() + cnt << endl;
}
