#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, a;
  cin >> N;
  map<string, int> LB;
  for (int i = 0; i < (int)(N); i++) {
    cin >> a;
    if (a <= 399)
      LB["grey"]++;
    else if (a <= 799)
      LB["brown"]++;
    else if (a <= 1199)
      LB["green"]++;
    else if (a <= 1599)
      LB["water"]++;
    else if (a <= 1999)
      LB["blue"]++;
    else if (a <= 2399)
      LB["yellow"]++;
    else if (a <= 2799)
      LB["orange"]++;
    else if (a <= 3199)
      LB["red"]++;
    else
      LB["any"]++;
  }
  int min_ans = 0, max_ans = 0;
  for (auto p : LB) {
    if (p.first != "any" && p.second > 0) {
      min_ans++;
      max_ans++;
    } else if (p.first == "any") {
      max_ans += p.second;
    }
  }
  cout << min_ans << " " << max_ans << endl;
}
