#include <bits/stdc++.h>
using namespace std;
void min(int x) {
  if (x == 0)
    cout << 1 << endl;
  else
    cout << x << " ";
  return;
}
void max(int x, int y) {
  while (x < 8 && y > 0) {
    x++;
    y--;
  }
  cout << x << endl;
  return;
}
int main() {
  int N;
  cin >> N;
  int rate[N];
  vector<int> cl(10);
  for (int i = 0; i < N; i++) {
    cin >> rate[i];
    if (rate[i] < 400) cl[0]++;
    if (400 <= rate[i] && rate[i] < 800) cl[1]++;
    if (800 <= rate[i] && rate[i] < 1200) cl[2]++;
    if (1200 <= rate[i] && rate[i] < 1600) cl[3]++;
    if (1600 <= rate[i] && rate[i] < 2000) cl[4]++;
    if (2000 <= rate[i] && rate[i] < 2400) cl[5]++;
    if (2400 <= rate[i] && rate[i] < 2800) cl[6]++;
    if (2800 <= rate[i] && rate[i] < 3200) cl[7]++;
    if (3200 <= rate[i]) cl[8]++;
  }
  int res = 0;
  for (int i = 0; i < 8; i++) {
    if (cl[i] > 0) res++;
  }
  min(res);
  max(res, cl[8]);
}
