#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  scanf("%d", &N);
  vector<int> a(N);
  for (int i = 0; i < (N); i++) cin >> a[i];
  map<string, int> m;
  for (int i = 0; i < (N); i++) {
    if (a[i] <= 400)
      m["grey"]++;
    else if (a[i] < 800)
      m["brown"]++;
    else if (a[i] < 1200)
      m["greren"]++;
    else if (a[i] < 1600)
      m["aqua"]++;
    else if (a[i] < 2000)
      m["blue"]++;
    else if (a[i] < 2400)
      m["yellow"]++;
    else if (a[i] < 2800)
      m["orange"]++;
    else if (a[i] < 3200)
      m["red"]++;
    else
      m["freedom"]++;
  }
  int ans = 0;
  for (auto c : m) {
    if (c.first != "freedom" && c.second > 0) ans++;
  }
  cout << ans << " " << ans + m["freedom"] << endl;
}
