#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
int color(ll rate) {
  if (rate <= 399) {
    return 1;
  } else if (rate <= 799) {
    return 2;
  } else if (rate <= 1199) {
    return 3;
  } else if (rate <= 1599) {
    return 4;
  } else if (rate <= 1999) {
    return 5;
  } else if (rate <= 2399) {
    return 6;
  } else if (rate <= 2799) {
    return 7;
  } else if (rate <= 3199) {
    return 8;
  } else {
    return 0;
  }
}
int COLOR_SIZE = 8;
void solve(ll N, std::vector<ll> a) {
  vector<ll> colorCount(COLOR_SIZE, 0);
  ll topRates = 0;
  for (ll x : a) {
    int c = color(x);
    if (c == 0) {
      topRates++;
    } else {
      colorCount.at(c - 1) += 1;
    }
  }
  int variation = 0;
  for (ll i = 0; i < (int)(COLOR_SIZE); i++) {
    ll count = colorCount.at(i);
    if (count != 0) variation++;
  }
  int min = variation;
  int max = variation + topRates;
  if (variation + topRates > COLOR_SIZE) {
    max = COLOR_SIZE;
  }
  cout << min << " " << max << endl;
}
int main() {
  ll N;
  scanf("%lld", &N);
  std::vector<ll> a(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &a[i]);
  }
  solve(N, std::move(a));
  return 0;
}
