#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int INF = 1001001001;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
struct edge {
  int from;
  int to;
  int cost;
};
unsigned Euclidean_gcd(unsigned a, unsigned b) {
  if (a < b) return Euclidean_gcd(b, a);
  unsigned r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}
int digit_sum(int n) {
  int sum = n % 10;
  while (n != 0) {
    n /= 10;
    sum += n % 10;
  }
  return sum;
}
vector<pair<long long, long long> > PrimeFactorization(long long n) {
  vector<pair<long long, long long> > res;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i != 0) continue;
    long long ex = 0;
    while (n % i == 0) {
      ex++;
      n /= i;
    }
    res.push_back(pair<long long, long long>(i, ex));
  }
  if (n != 1) res.push_back(pair<long long, long long>(n, 1));
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  map<string, int> m;
  int any = 0;
  for (int i = 0; i < (n); i++) {
    if (a[i] < 400) m["gray"]++;
    if (400 <= a[i] && a[i] < 800) m["brown"]++;
    if (800 <= a[i] && a[i] < 1200) m["green"]++;
    if (1200 <= a[i] && a[i] < 1600) m["lightblue"]++;
    if (1600 <= a[i] && a[i] < 2000) m["blue"]++;
    if (2000 <= a[i] && a[i] < 2400) m["yellow"]++;
    if (2400 <= a[i] && a[i] < 2800) m["orange"]++;
    if (2800 <= a[i] && a[i] < 3200) m["red"]++;
    if (3200 <= a[i]) any++;
  }
  cout << m.size() << " " << m.size() + any << endl;
  return 0;
}
