#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());
  for (int i = 0; i < (int)(N); i++) {
    bool allzero = false;
    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 {
      allzero = true;
      for (int i = 0; i < (int)(8); i++)
        if (mincheck[i] != 0) allzero = false;
      for (int i = 0; i < (int)(8); i++)
        if (maxcheck[i] == 0) {
          maxcheck[i]++;
          break;
        }
    }
    if (allzero) {
      for (int i = 0; i < (int)(8); i++)
        if (mincheck[i] == 0) mincheck[i]++;
    }
  }
  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;
}
