#include <bits/stdc++.h>
using namespace std;
using LL = long long;
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  bitset<8> bit;
  int count = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a < 400) {
      bit[0] = 1;
    } else if (a < 800) {
      bit[1] = 1;
    } else if (a < 1200) {
      bit[2] = 1;
    } else if (a < 1600) {
      bit[3] = 1;
    } else if (a < 2000) {
      bit[4] = 1;
    } else if (a < 2400) {
      bit[5] = 1;
    } else if (a < 2800) {
      bit[6] = 1;
    } else if (a < 3200) {
      bit[7] = 1;
    } else {
      count++;
    }
  }
  cout << max(1, int(bit.count())) << " " << min(8, int(bit.count()) + count)
       << endl;
  return 0;
}
