#include <bits/stdc++.h>
using namespace std;
namespace utils {
template <typename T>
void print(vector<vector<T>> mat) {
  for (int i = 0; i < (int)(mat.size()); i++) {
    for (int j = 0; j < (int)(mat[0].size()); j++) cout << mat[i][j] << ' ';
    cout << endl;
  }
}
template <typename T>
void print(vector<T> v) {
  for (int i = 0; i < (int)(v.size()); i++)
    if (i >= v.size() - 1)
      cout << v[i];
    else
      cout << v[i] << ' ';
  cout << endl;
}
template <typename T>
pair<T, T> shape(vector<vector<T>> mat) {
  int d1, d2;
  d1 = mat.size();
  if (d1 > 0)
    d2 = mat[0].size();
  else
    int d2 = 0;
  cout << "(" << d1 << ", " << d2 << ")" << endl;
  return make_pair(0, 0);
}
template <typename T>
vector<vector<T>> empty(int n, int m) {
  vector<vector<T>> mat(n, vector<T>(m));
  return mat;
}
}  // namespace utils
int main() {
  int n;
  scanf("%d", &n);
  ;
  vector<int> A(n);
  for (int i = 0; i < (int)(n); i++) scanf("%d", &A[i]);
  ;
  int gray, blaun, green, sky, blue, yellow, orange, red;
  int cnt;
  int B[8] = {};
  sort(A.begin(), A.end());
  for (int i = 0; i < (int)(n); i++) {
    if (A[i] >= 1 && A[i] < 400) {
      gray++;
      B[0]++;
    } else if (A[i] >= 400 && A[i] < 800) {
      blaun++;
      B[1]++;
    } else if (A[i] >= 800 && A[i] < 1200) {
      green++;
      B[2]++;
    } else if (A[i] >= 1200 && A[i] < 1600) {
      sky++;
      B[3]++;
    } else if (A[i] >= 1600 && A[i] < 2000) {
      blue++;
      B[4]++;
    } else if (A[i] >= 2000 && A[i] < 2400) {
      yellow++;
      B[5]++;
    } else if (A[i] >= 2400 && A[i] < 2800) {
      orange++;
      B[6]++;
    } else if (A[i] >= 2800 && A[i] < 3200) {
      red++;
      B[7]++;
    } else {
      cnt++;
    }
  }
  int i_max, i_min;
  i_max = 0;
  i_min = 0;
  if (cnt != 0) {
    for (int i = 0; i < (int)(8); i++) {
      if (B[i] > 0) {
        i_max++;
        i_min++;
      }
    }
    while (cnt > 0) {
      if (i_max < 8) {
        i_max++;
      }
      cnt--;
    }
  } else {
    cout << i_max << endl;
    for (int i = 0; i < (int)(8); i++) {
      if (B[i] > 0) {
        i_max++;
        i_min++;
      }
    }
  }
  cout << i_min << " " << i_max << endl;
}
