#include <bits/stdc++.h>
using namespace std;
int dy[4] = {0, 0, 1, -1};
int dx[4] = {1, -1, 0, 0};
int main() {
  int N;
  cin >> N;
  int any = 0;
  set<int> rate;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    if (a >= 3200) {
      any++;
    } else if (1 <= a && a <= 399)
      rate.insert(1);
    else if (400 <= a && a <= 799)
      rate.insert(2);
    else if (800 <= a && a <= 1199)
      rate.insert(3);
    else if (1200 <= a && a <= 1599)
      rate.insert(4);
    else if (1600 <= a && a <= 1999)
      rate.insert(5);
    else if (2000 <= a && a <= 2399)
      rate.insert(6);
    else if (2400 <= a && a <= 2799)
      rate.insert(7);
    else if (2800 <= a && a <= 3199)
      rate.insert(8);
  }
  int color = rate.size();
  int mini, max;
  if (color == 0) {
    mini = 1;
    max = min(any, 8);
  } else {
    if (color == 8) {
      mini = 8;
      max = 8;
    } else {
      if (any > 0) {
        mini = color;
        max = min((color + any), 8);
      } else {
        mini = color;
        max = color;
      }
    }
  }
  cout << mini << " " << max << endl;
  return 0;
}
