#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI = acos(-1.0);
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int QP(int a, int b) {
  int ans = 1;
  do {
    if (b & 1) ans = 1ll * ans * a % MOD;
    a = 1ll * a * a % MOD;
  } while (b >>= 1);
  return ans;
}
int QP(int a, int b, int MOD) {
  int ans = 1;
  do {
    if (b & 1) ans = 1ll * ans * a % MOD;
    a = 1ll * a * a % MOD;
  } while (b >>= 1);
  return ans;
}
int GCD(int a, int b) { return b ? GCD(b, a % b) : a; }
int N, M;
vector<int> Vec;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  vector<bool> V(8, false);
  int N;
  cin >> N;
  int n_free = 0;
  for (int i = (0); i < (N); ++i) {
    int a;
    cin >> a;
    if (1 <= a && a < 400)
      V[0] = true;
    else if (400 <= a && a < 800)
      V[1] = true;
    else if (800 <= a && a < 1200)
      V[2] = true;
    else if (1200 <= a && a < 1600)
      V[3] = true;
    else if (1600 <= a && a < 2000)
      V[4] = true;
    else if (2000 <= a && a < 2400)
      V[5] = true;
    else if (2400 <= a && a < 2800)
      V[6] = true;
    else if (2800 <= a && a < 3200)
      V[7] = true;
    else if (3200 <= a)
      n_free++;
  }
  int min_ans, max_ans;
  int sum_V = accumulate((V).begin(), (V).end(), 0);
  max_ans = min(8, sum_V + n_free);
  min_ans = sum_V;
  cout << min_ans << " " << max_ans << "\n";
  return 0;
}
