#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(0);
  int n;
  cin >> n;
  int mn = 0, mx = 0;
  vector<int> used(10);
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    if (x >= 3200) {
      ++mx;
      continue;
    } else if (x <= 399) {
      ++used[0];
      continue;
    } else if (x <= 799) {
      ++used[1];
      continue;
    } else if (x <= 1199) {
      ++used[2];
      continue;
    } else if (x <= 1599) {
      ++used[3];
      continue;
    } else if (x <= 1999) {
      ++used[4];
      continue;
    } else if (x <= 2399) {
      ++used[5];
      continue;
    } else if (x <= 2799) {
      ++used[6];
      continue;
    } else if (x <= 3199) {
      ++used[7];
      continue;
    }
  }
  int mna = 0, mxa = 0;
  for (int i = 0; i < 8; ++i) {
    if (used[i]) {
      ++mna;
    }
  }
  int c = 8 - mna;
  c = min(c, mx);
  mxa = mna;
  mna = max(mna, 1);
  mna = min(mna, 8);
  cout << mna << " " << mxa + c << '\n';
  return 0;
}
