#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <typename T = int>
using V = vector<T>;
template <typename T = int>
using P = pair<T, T>;
using Vi = V<int>;
using Vl = V<ll>;
using Vd = V<ld>;
using VVi = V<Vi>;
using VVl = V<Vl>;
using Pi = P<int>;
using Pl = P<ll>;
using Pd = P<ld>;
constexpr ll MOD = 1000000007;
constexpr int INF = (1 << 30) - 1;
constexpr ll INFL = 1LL << 60;
constexpr ld EPS = 1e-12;
constexpr ld PI = 3.141592653589793238462643383279;
int main(void) {
  int n;
  cin >> n;
  set<int> c;
  int x = 0;
  for (int i = 0, i_len = (n); i < i_len; ++i) {
    int a;
    cin >> a;
    for (int j = 1; j < 2800; j += 399) {
      if (j <= a && a < (j + 399)) {
        c.insert(j);
        break;
      }
    }
    if (3200 <= a) ++x;
  }
  cout << ((int)(c).size()) << " " << min(((int)(c).size()) + x, 8) << endl;
  return 0;
}
