#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  vector<int> a(N);
  vector<string> b(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (1 <= a[i] && a[i] < 400)
      b[i] = "Grey";
    else if (400 <= a[i] && a[i] < 800)
      b[i] = "Brawn";
    else if (800 <= a[i] && a[i] < 1200)
      b[i] = "Green";
    else if (1200 <= a[i] && a[i] < 1600)
      b[i] = "Cyan";
    else if (1600 <= a[i] && a[i] < 2000)
      b[i] = "Blue";
    else if (2000 <= a[i] && a[i] < 2400)
      b[i] = "Yellow";
    else if (2400 <= a[i] && a[i] < 2800)
      b[i] = "Orange";
    else if (2800 <= a[i] && a[i] < 3200)
      b[i] = "Red";
    else if (a[i] >= 3200)
      b[i] = "Black";
  }
  map<string, int> mp;
  int SS = 0;
  int SB = 0;
  for (int i = 0; i < N; i++) {
    if (b[i] == "Black")
      SB++;
    else if (mp.count(b[i]))
      mp[b[i]]++;
    else {
      mp[b[i]] = 1;
      SS++;
    }
  }
  cout << SS << " " << SS + SB << endl;
}
