#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<bool> flag(8, false);
  int cnt = 0;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    if (a < 400) {
      flag[0] = true;
    } else if (400 <= a && a < 800) {
      flag[1] = true;
    } else if (800 <= a && a < 1200) {
      flag[2] = true;
    } else if (1200 <= a && a < 1600) {
      flag[3] = true;
    } else if (1600 <= a && a < 2000) {
      flag[4] = true;
    } else if (2000 <= a && a < 2400) {
      flag[5] = true;
    } else if (2400 <= a && a < 2800) {
      flag[6] = true;
    } else if (2800 <= a && a < 3200) {
      flag[7] = true;
    } else {
      cnt++;
    }
  }
  int cnt2 = 0;
  for (int i = 0; i < 8; i++) {
    if (flag[i]) {
      cnt2++;
    }
  }
  if (cnt == 0) {
    cout << cnt2 << " " << cnt2 << endl;
  } else {
    if (cnt2 > 0) {
      cout << cnt2 << " " << max(cnt2 + cnt, 8) << endl;
    } else {
      cout << 1 << " " << max(cnt, 8) << endl;
    }
  }
  return 0;
}
