#include <bits/stdc++.h>
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
const long long M = 1000000007ll;
const long long MOD = 1000000007ll;
const long long MAX = 100000001ll;
const int mod = 1000000007;
struct mint {
  long long x;
  mint(long long x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod - a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res -= a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res *= a;
  }
  mint pow(long long t) const {
    if (!t) return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1) a *= *this;
    return a;
  }
  mint inv() const { return pow(mod - 2); }
  mint& operator/=(const mint a) { return (*this) *= a.inv(); }
  mint operator/(const mint a) const {
    mint res(*this);
    return res /= a;
  }
};
mint f(long long n) {
  if (n == 0) return 1;
  mint ans = f(n / 2);
  ans *= ans;
  if (n % 2 == 1) ans *= 2;
  return ans;
}
mint choose(long long n, long long k) {
  mint x = 1, y = 1;
  for (long long i = 0; i < (k); i++) {
    x *= (n - i);
    y *= (i + 1);
  }
  return x / y;
}
struct BIT {
 private:
  vector<long long> bit;
  long long N;

 public:
  BIT(long long size) {
    N = size;
    bit.resize(N + 1);
  }
  void add(long long a, long long w) {
    for (long long x = a; x <= N; x += x & -x) bit[x] += w;
  }
  int sum(long long a) {
    long long ret = 0;
    for (long long x = a; x > 0; x -= x & -x) ret += bit[x];
    return ret;
  }
};
long long fff(long long n, vector<long long>& v, long long i, long long j,
              long long rl) {
  long long can = 0;
  long long can_i = 0;
  cout << v[0] << endl;
  if (rl == 0) {
    for (long long k = 0; k < (n); k++) {
      if (v[k] * (j - k) > can) {
        can = v[k] * (j - k);
        can_i = k;
      }
    }
    v[can_i] = 0;
    return can;
  } else {
    for (long long k = 0; k < (n); k++) {
      if (v[k] * (k - i) > can) {
        can = v[k] * (k - i);
        can_i = k;
      }
    }
    v[can_i] = 0;
    return can;
  }
}
int main() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  set<long long> s = {-1};
  long long tmp, cnt = 0;
  for (long long i = 0; i < (n); i++) {
    cin >> tmp;
    if (tmp >= 2800) {
      cnt++;
    } else {
      s.insert(tmp / 400);
    }
  }
  long long maxi = s.size() - 1 + cnt;
  cout << s.size() - 1 << " " << min(1LL * 8, maxi) << endl;
}
