#include <bits/stdc++.h>
using namespace std;
int N;
bool color[8];
int high = 0;
inline void solve() {
  int ans = 0;
  for (int i = 0; i < 8; ++i) {
    if (color[i]) {
      ans++;
    }
  }
  if (high != 0) {
    cout << max(ans, 1) << " " << min(ans + high, 8) << endl;
  } else {
    cout << ans << " " << ans << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  for (int i = 0; i < N; ++i) {
    int a;
    cin >> a;
    if (a < 400) {
      color[0] = true;
    } else if (a < 800) {
      color[1] = true;
    } else if (a < 1200) {
      color[2] = true;
    } else if (a < 1600) {
      color[3] = true;
    } else if (a < 2000) {
      color[4] = true;
    } else if (a < 2400) {
      color[5] = true;
    } else if (a < 2800) {
      color[6] = true;
    } else if (a < 3200) {
      color[7] = true;
    } else {
      high++;
    }
  }
  solve();
  return 0;
}
