#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
long long gcd(long long x, long long y) { return (y == 0) ? x : gcd(y, x % y); }
long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
bool IsPrime(int num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  int n, ans = 0, tmp = 0, sum[8] = {};
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] <= 399) {
      sum[0] = 1;
    } else if (a[i] <= 799) {
      sum[1] = 1;
    } else if (a[i] <= 1199) {
      sum[2] = 1;
    } else if (a[i] <= 1599) {
      sum[3] = 1;
    } else if (a[i] <= 1999) {
      sum[4] = 1;
    } else if (a[i] <= 2399) {
      sum[5] = 1;
    } else if (a[i] <= 2799) {
      sum[6] = 1;
    } else if (a[i] <= 3199) {
      sum[7] = 1;
    } else
      tmp++;
  }
  for (int i = 0; i < 8; i++) ans += sum[i];
  cout << ans << " " << min(8, ans + tmp) << endl;
  return 0;
}
