#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<string, int> rating;
  int ans_min = 0, ans_add = 0;
  for (int i = 0; i < (int)(n); i++) {
    int a;
    cin >> a;
    if (a < 400)
      rating["Gray"]++;
    else if (a < 800)
      rating["Brown"]++;
    else if (a < 1200)
      rating["Green"]++;
    else if (a < 1600)
      rating["Cyan"]++;
    else if (a < 2000)
      rating["Blue"]++;
    else if (a < 2400)
      rating["Yellow"]++;
    else if (a < 2800)
      rating["Orange"]++;
    else if (a < 3200)
      rating["Red"]++;
    else
      ans_add++;
  }
  for (auto x : rating) {
    if (x.second > 0) ans_min++;
  }
  cout << ans_min << ' ' << ans_min + ans_add << endl;
}
