#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
  ll g = gcd(a, b);
  return a / g * b;
}
ll mulMod(ll a, ll b) { return (((a % MOD) * (b % MOD)) % MOD); }
void solve(long long N, std::vector<long long> a) {
  int free = 0;
  vector<bool> existColor(8, false);
  for (int i = 0; i < (N); ++i) {
    int rate = a[i];
    if (rate <= 399) {
      existColor[0] = true;
    } else if (rate <= 799) {
      existColor[1] = true;
    } else if (rate <= 1199) {
      existColor[2] = true;
    } else if (rate <= 1599) {
      existColor[3] = true;
    } else if (rate <= 1999) {
      existColor[4] = true;
    } else if (rate <= 2399) {
      existColor[5] = true;
    } else if (rate <= 2799) {
      existColor[6] = true;
    } else if (rate <= 3199) {
      existColor[7] = true;
    } else {
      free++;
    }
  }
  int cnt = 0;
  for (int i = 0; i < (8); ++i) {
    if (existColor[i]) cnt++;
  }
  if (free == 0) {
    cout << cnt << " " << cnt << endl;
  } else {
    cout << max(cnt, 1) << " " << min(8, cnt + free) << endl;
  }
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> a(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &a[i]);
  }
  solve(N, std::move(a));
  return 0;
}
