#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long t;
  if (a < b) {
    t = a;
    a = b;
    b = t;
  }
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
long long Factorial(long long a) {
  long long b = 1;
  for (long long i = a; i >= 1; i--) {
    b = b * i;
  }
  return b;
}
bool prime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  long long N, Over = 0, color = 0;
  vector<long long> V(8, 0);
  cin >> N;
  for (int i = 0; i < (int)N; ++i) {
    long long t;
    cin >> t;
    if (t < 400)
      V[0] = 1;
    else if (t < 800 && t >= 400)
      V[1] = 1;
    else if (t < 1200 && t >= 800)
      V[2] = 1;
    else if (t < 1600 && t >= 1200)
      V[3] = 1;
    else if (t < 2000 && t >= 1600)
      V[4] = 1;
    else if (t < 2400 && t >= 2000)
      V[5] = 1;
    else if (t < 2800 && t >= 2400)
      V[6] = 1;
    else if (t < 3200 && t >= 2800)
      V[7] = 1;
    else
      Over++;
  }
  color = count(V.begin(), V.end(), 1);
  if (color == 0 && Over <= 8) {
    cout << "1 " << Over << endl;
  } else if (color == 0 && Over > 8) {
    cout << "1 8" << endl;
  } else if (color == 8) {
    cout << "8 8" << endl;
  } else if (color + Over <= 8) {
    cout << color << " " << color + Over << endl;
  } else if (color + Over > 8) {
    cout << color << " 8" << endl;
  }
}
