#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
long long dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
long long gcd(long long x, long long y) {
  long long r;
  while ((r = x % y) != 0) {
    x = y;
    y = r;
  }
  return y;
}
long long lcm(long long x, long long y) {
  x /= gcd(x, y);
  y /= gcd(x, y);
  return (x * y);
}
int main() {
  long long n;
  long long col[8] = {399, 799, 1199, 1599, 1999, 2399, 2799, 3199};
  cin >> n;
  long long cnt = 0;
  vector<long long> a(n), tmp(8, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 0; j < 8; j++) {
      if (a[i] <= col[j]) {
        tmp[j]++;
        break;
      }
    }
    if (a[i] >= 3200) cnt++;
  }
  long long minn = 0;
  for (int i = 0; i < 8; i++) {
    if (tmp[i] > 0) minn++;
  }
  cout << minn << " " << min(8, (int)(minn + cnt)) << endl;
  return 0;
}
