#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, great = 0;
  cin >> n;
  long long int no;
  set<string> s;
  for (long long int i = 0; i < n; i++) {
    cin >> no;
    if (no <= 399) {
      s.insert("gray");
    } else if (no <= 799) {
      s.insert("brown");
    } else if (no <= 1199) {
      s.insert("green");
    } else if (no <= 1599) {
      s.insert("cyan");
    } else if (no <= 1999) {
      s.insert("blue");
    } else if (no <= 2399) {
      s.insert("yellow");
    } else if (no <= 2799) {
      s.insert("orange");
    } else if (no <= 3199) {
      s.insert("red");
    } else {
      great++;
    }
  }
  cout << s.size() << " " << s.size() + great << endl;
}
