#include <bits/stdc++.h>
using namespace std;
long int pow107 = (int)pow(10, 9) + 7;
int ilimit = INT_MAX;
long int llimit = LONG_MAX;
bool comp(pair<int, string> a, pair<int, string> b) {
  if (a.first != b.first)
    return a.first > b.first;
  else
    return a.second < b.second;
}
long int jou(long int x, long int y) {
  long int f = 1;
  for (int i = 0; i < y; ++i) {
    f = f * x % pow107;
  }
  return f;
}
bool pn(long int x) {
  if (x != 2 && x % 2 == 0) return false;
  for (int i = 3; i < x; ++i) {
    if (x != i && x % i == 0) return false;
  }
  return true;
}
long int factorial(long int n) {
  long int f = 1;
  for (long int i = 1; i <= n; ++i) {
    f = f * i % pow107;
  }
  return f;
}
int main() {
  long int n;
  cin >> n;
  long int r[9] = {};
  for (long int i = 0; i < n; ++i) {
    long int a;
    cin >> a;
    if (a >= 3200 && a <= 4800) {
      r[8]++;
    } else if (a >= 1 && a < 3200) {
      r[a / 400]++;
    }
  }
  long int c = 0;
  for (long int i = 0; i < 8; ++i) {
    if (r[i] != 0) c++;
  }
  if (c == 0) {
    cout << 1 << " ";
  } else {
    cout << c << " ";
  }
  if (c + r[8] <= 8) {
    cout << c + r[8] << endl;
  } else {
    cout << 8 << endl;
  }
}
