#include <bits/stdc++.h>
using namespace std;
string rate(int a) {
  if (a < 400) return "gray";
  if (a < 800) return "brown";
  if (a < 1200) return "green";
  if (a < 1600) return "cyan";
  if (a < 2000) return "blue";
  if (a < 2400) return "yellow";
  if (a < 2800) return "oragen";
  if (a < 3200) return "red";
}
int main() {
  int n;
  cin >> n;
  map<string, int> mp;
  int tourist = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x < 3200)
      mp[rate(x)]++;
    else
      tourist++;
  }
  int ans1 = mp.size();
  int ans2 = ans1 + tourist;
  cout << min(ans1, 1) << " " << ans2 << endl;
}
