#include <bits/stdc++.h>
using namespace std;
void solve() {
  int N;
  cin >> N;
  vector<int> rate(9, 0);
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    if (1 <= a && a < 400) rate[0]++;
    if (400 <= a && a < 800) rate[1]++;
    if (800 <= a && a < 1200) rate[2]++;
    if (1200 <= a && a < 1600) rate[3]++;
    if (1600 <= a && a < 2000) rate[4]++;
    if (2000 <= a && a < 2400) rate[5]++;
    if (2400 <= a && a < 2800) rate[6]++;
    if (2800 <= a && a < 3200) rate[7]++;
    if (a >= 3200) rate[8]++;
  }
  int ans = 0;
  for (int i = 0; i < 8; i++) {
    if (rate[i] > 0) {
      ans++;
    }
  }
  if (ans == 0 && rate[8] > 0) {
    ans = 1;
  }
  cout << ans << " " << ans + rate[8] << endl;
  return;
}
int main(int argc, char const* argv[]) {
  solve();
  return 0;
}
