#include <bits/stdc++.h>
using namespace std;
pair<int, int> color[] = {
    pair<int, int>(1, 399),       pair<int, int>(400, 799),
    pair<int, int>(800, 1199),    pair<int, int>(1200, 1599),
    pair<int, int>(1600, 1999),   pair<int, int>(2000, 2399),
    pair<int, int>(2400, 2799),   pair<int, int>(2800, 3199),
    pair<int, int>(3200, INT_MAX)};
const int COLORS = 9;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0, i_len = (n); i < i_len; i++) cin >> a[i];
  int c[COLORS] = {0};
  int amin = 0, amax = 0;
  for (int i = 0, i_len = (n); i < i_len; i++) {
    for (int ii = 0, ii_len = (COLORS); ii < ii_len; ii++) {
      if ((color[ii].first <= a[i]) && (color[ii].second >= a[i])) {
        c[ii]++;
        break;
      }
    }
  }
  for (int i = 0, i_len = (COLORS); i < i_len; i++) {
    if (i == (COLORS - 1)) {
      amax = min(COLORS, amax + c[i]);
      amin = max(amin, c[i]);
    } else {
      if (c[i]) {
        amin++;
        amax++;
      }
    }
  }
  cout << amin << " " << amax << endl;
  return 0;
}
