#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < (int)(N); i++) cin >> a[i];
  vector<int> maxcheck(8, 0);
  vector<int> mincheck(8, 0);
  sort(a.begin(), a.end());
  if (a[0] >= 3200) {
    if (N <= 8) {
      cout << 1 << " " << N << endl;
      return 0;
    } else {
      cout << 1 << " " << 8 << endl;
      return 0;
    }
  }
  for (int i = 0; i < (int)(N); i++) {
    if (a[i] <= 399)
      maxcheck[0]++, mincheck[0]++;
    else if (a[i] <= 799)
      maxcheck[1]++, mincheck[1]++;
    else if (a[i] <= 1199)
      maxcheck[2]++, mincheck[2]++;
    else if (a[i] <= 1599)
      maxcheck[3]++, mincheck[3]++;
    else if (a[i] <= 1999)
      maxcheck[4]++, mincheck[4]++;
    else if (a[i] <= 2399)
      maxcheck[5]++, mincheck[5]++;
    else if (a[i] <= 2799)
      maxcheck[6]++, mincheck[6]++;
    else if (a[i] <= 3199)
      maxcheck[7]++, mincheck[7]++;
    else if (a[i] <= 4800) {
      bool maxc = true;
      for (int j = 0; j < (int)(8); j++) {
        if (maxcheck[j] == 0) maxc = false;
      }
      if (!maxc)
        for (int j = 0; j < (int)(8); j++)
          if (maxcheck[j] == 0) {
            maxcheck[j]++;
            break;
          }
    }
  }
  int cntma = 0;
  int cntmi = 0;
  for (int i = 0; i < (int)(8); i++) {
    if (maxcheck[i] > 0) cntma++;
    if (mincheck[i] > 0) cntmi++;
  }
  cout << cntmi << " " << cntma << endl;
  return 0;
}
