#include <bits/stdc++.h>
using namespace std;
using P = pair<int64_t, int64_t>;
using Graph = vector<vector<P>>;
template <class T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <class T>
using max_heap = priority_queue<T>;
template <class A, class B>
using umap = unordered_map<A, B>;
template <class A>
using uset = unordered_set<A>;
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
template <class A, class B>
bool chmax(A &a, const B &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class A, class B>
bool chmin(A &a, const B &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int64_t dx[4] = {1, 0, -1, 0};
int64_t dy[4] = {0, 1, 0, -1};
constexpr int64_t INF = 0x3f3f3f3f;
constexpr int64_t LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int64_t mod1 = 1e9 + 7;
constexpr int64_t mod2 = 998244353;
signed main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  int64_t n;
  cin >> n;
  set<int64_t> x;
  set<int64_t> y;
  bool f = false;
  int64_t cnt = 0;
  for (int64_t i = (0); i < (n); ++i) {
    int64_t a;
    cin >> a;
    int64_t on = 8;
    if (a >= 3200) {
      x.insert(on);
      y.insert(on);
      ++cnt;
      f = true;
    } else if (a >= 2800) {
      x.insert(on - 1);
      y.insert(on - 1);
    } else if (a >= 2400) {
      x.insert(on - 2);
      y.insert(on - 2);
    } else if (a >= 2000) {
      x.insert(on - 3);
      y.insert(on - 3);
    } else if (a >= 1600) {
      x.insert(on - 4);
      y.insert(on - 4);
    } else if (a >= 1200) {
      x.insert(on - 5);
      y.insert(on - 5);
    } else if (a >= 800) {
      x.insert(on - 6);
      y.insert(on - 6);
    } else if (a >= 400) {
      x.insert(on - 7);
      y.insert(on - 7);
    } else {
      x.insert(on - 8);
      y.insert(on - 8);
    }
  }
  cout << (f == true ? y.size() - 1 : y.size()) << ' ';
  cout << (f == true ? x.size() + cnt - 1 : x.size()) << '\n';
  return 0;
}
