#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  set<string> s;
  int rainbowCount = 0;
  for (int i = 0; i < (n); ++i) {
    int v = a[i];
    switch (v) {
      case 1 ... 399:
        s.insert("gray");
        break;
      case 400 ... 799:
        s.insert("brown");
        break;
      case 800 ... 1199:
        s.insert("green");
        break;
      case 1200 ... 1599:
        s.insert("sky");
        break;
      case 1600 ... 1999:
        s.insert("blue");
        break;
      case 2000 ... 2399:
        s.insert("yellow");
        break;
      case 2400 ... 2799:
        s.insert("orange");
        break;
      case 2800 ... 3199:
        s.insert("red");
        break;
      default:
        rainbowCount++;
    }
  }
  cout << max(1, (int)s.size()) << " " << min(8, (int)s.size() + rainbowCount)
       << endl;
  return 0;
}
