#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (a > b)
    return gcd(a % b, b);
  else
    return gcd(b % a, a);
}
long long lcm(long long a, long long b) {
  long long tmp = gcd(a, b);
  return (a / tmp) * (b / tmp) * tmp;
}
long long ex(long long x) {
  if (x == 1) return 1;
  return (x * ex(x - 1)) % MOD;
}
int main() {
  int N;
  cin >> N;
  int b[8] = {};
  int other = 0;
  for (int(i) = (0); (i) < (N); ++(i)) {
    int a;
    cin >> a;
    if (1 <= a && a < 400)
      b[0]++;
    else if (400 <= a && a < 800)
      b[1]++;
    else if (800 <= a && a < 1200)
      b[2]++;
    else if (1200 <= a && a < 1600)
      b[3]++;
    else if (1600 <= a && a < 2000)
      b[4]++;
    else if (2000 <= a && a < 2400)
      b[5]++;
    else if (2400 <= a && a < 2800)
      b[6]++;
    else if (2800 <= a && a < 3200)
      b[7]++;
    else
      other++;
  }
  sort(b, b + 8);
  int count = 0;
  while (b[count] == 0) {
    count++;
  }
  int ans = 8 - count;
  cout << ans << " ";
  if (count <= other)
    cout << ans + count << endl;
  else
    cout << ans + other << endl;
}
