#include <bits/stdc++.h>
long long A, B, C, D, E, F, I, J, K, M, N, O, Q, R, S, T, U, V, X, Y, Z;
double dA, dB, dC, dD, dE, dF, dI, dJ, dK, dM, dN, dO, dP, dQ, dR, dS, dT, dU,
    dV, dX, dY, dZ;
using namespace std;
const string MINUSINF = "-";
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
void chmax(string& a, string b) {
  if (a == MINUSINF)
    a = b;
  else if (a.size() < b.size())
    a = b;
  else if (a.size() == b.size()) {
    if (a < b) a = b;
  }
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
stack<long long> sta;
queue<long long> que;
deque<long long> dque;
set<string> s_set;
long long sum, sum1, sum2, sum3, sum4;
long long flg, flg1, flg2, flg3, cnt, cnt1, cnt2, cnt3, cnt4;
long long wk, wk1, wk2, wk3, wk4;
long long ans;
double dsum, dsum1, dsum2, dsum3, dsum4;
double dcnt, dcnt1, dcnt2, dcnt3, dcnt4;
double dwk, dwk1, dwk2, dwk3, dwk4;
double dans;
double dmax, dmax1;
double dmin, dmin1;
long long weight[110], value[110];
long long n, h[100005];
vector<long long> p, c;
int vis[200001];
vector<string> first;
int Left[2100][2100], Right[2100][2100], Up[2100][2100], Down[2100][2100];
long long match[10] = {2, 5, 5, 4, 5, 6, 3, 7, 6};
vector<long long> box;
vector<pair<long long, long long> > prime_factorize(long long n) {
  vector<pair<long long, long long> > res;
  for (long long p = 2; p * p <= n; ++p) {
    if (n % p != 0) continue;
    int num = 0;
    while (n % p == 0) {
      ++num;
      n /= p;
    }
    res.push_back(make_pair(p, num));
  }
  if (n != 1) res.push_back(make_pair(n, 1));
  return res;
}
vector<long long> calc_divisor(long long n) {
  vector<long long> res;
  for (long long i = 1LL; i * i <= n; ++i) {
    if (n % i == 0) {
      res.push_back(i);
      long long j = n / i;
      if (j != i) res.push_back(j);
    }
  }
  sort(res.begin(), res.end());
  return res;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  long long max, max1;
  long long min, min1;
  sum = sum1 = sum2 = sum3 = sum4 = 0;
  flg = flg1 = flg2 = flg3 = cnt = cnt1 = cnt2 = cnt3 = cnt4 = 0;
  max = max1 = 0;
  wk = wk1 = wk2 = wk3 = wk4 = 0;
  ans = 0;
  min = min1 = 1e18 + 5;
  dsum = dsum1 = dsum2 = dsum3 = dsum4 = 0;
  dcnt = dcnt1 = dcnt2 = dcnt3 = dcnt4 = 0;
  dmax = dmax1 = 0;
  dwk = dwk1 = dwk2 = dwk3 = dwk4 = 0;
  dans = 0;
  dmin = dmin1 = 1e18 + 5;
  std::cin >> N;
  long long f1, f2, f3, f4, f5, f6, f7, f8, f9;
  f1 = f2 = f3 = f4 = f5 = f6 = f7 = f8 = f9 = 0;
  std::vector<long long> v(N);
  for (long long i = 0; i < N; i++) {
    cin >> v[i];
  }
  min = max = wk = 0;
  for (long long i = 0; i < N; i++) {
    if (v[i] >= 1 && v[i] <= 399) {
      if (f1 == 0) {
        min++;
        max++;
      }
      f1 = 1;
    } else if (v[i] >= 1 && v[i] <= 399) {
      if (f2 == 0) {
        min++;
        max++;
      }
      f2 = 1;
    } else if (v[i] >= 400 && v[i] <= 799) {
      if (f3 == 0) {
        min++;
        max++;
      }
      f3 = 1;
    } else if (v[i] >= 800 && v[i] <= 1199) {
      if (f4 == 0) {
        min++;
        max++;
      }
      f4 = 1;
    } else if (v[i] >= 1200 && v[i] <= 1599) {
      if (f5 == 0) {
        min++;
        max++;
      }
      f5 = 1;
    } else if (v[i] >= 1600 && v[i] <= 1999) {
      if (f6 == 0) {
        min++;
        max++;
      }
      f6 = 1;
    } else if (v[i] >= 2000 && v[i] <= 2399) {
      if (f7 == 0) {
        min++;
        max++;
      }
      f7 = 1;
    } else if (v[i] >= 2400 && v[i] <= 2799) {
      if (f8 == 0) {
        min++;
        max++;
      }
      f8 = 1;
    } else if (v[i] >= 2800 && v[i] <= 3199) {
      if (f9 == 0) {
        min++;
        max++;
      }
      f9 = 1;
    } else {
      wk++;
    }
  }
  printf("%lld %lld", min, (long long)(((8) < (min + wk)) ? (8) : (min + wk)));
  return 0;
  if (1) {
  } else {
  }
  if (1) {
  } else {
  }
  return 0;
}
