#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int ai[N];
  int ans = 0;
  int over1 = 0, over2 = 0;
  vector<bool> bi(8, true);
  for (int i = 0; i < N; i++) {
    cin >> ai[i];
  }
  for (int i = 0; i < N; i++) {
    if (ai[i] >= 1 && ai[i] <= 399 && bi[0]) {
      ans++;
      bi[0] = false;
    } else if (ai[i] >= 400 && ai[i] <= 799 && bi[1]) {
      ans++;
      bi[1] = false;
    } else if (ai[i] >= 800 && ai[i] <= 1199 && bi[2]) {
      ans++;
      bi[2] = false;
    } else if (ai[i] >= 1200 && ai[i] <= 1599 && bi[3]) {
      ans++;
      bi[3] = false;
    } else if (ai[i] >= 1600 && ai[i] <= 1999 && bi[4]) {
      ans++;
      bi[4] = false;
    } else if (ai[i] >= 2000 && ai[i] <= 2399 && bi[5]) {
      ans++;
      bi[5] = false;
    } else if (ai[i] >= 2400 && ai[i] <= 2799 && bi[6]) {
      ans++;
      bi[6] = false;
    } else if (ai[i] >= 2800 && ai[i] <= 3199 && bi[7]) {
      ans++;
      bi[7] = false;
    } else if (ai[i] >= 2800) {
      over1++;
    }
  }
  for (int i = 0; i < over1; i++) {
    if (bi[i]) {
      over2++;
      bi[i] = false;
    }
  }
  cout << ans << " " << ans + over2 << endl;
}
