#include <bits/stdc++.h>
using namespace std;
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 (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const long double pi = acos(-1.0);
const long long MAX = 1000010;
const long long INF = 1LL << 60;
const long long MOD = 1000000007;
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  map<long long, long long> mp;
  for (long long i = 0; i < (long long)(n); i++) {
    long long a;
    cin >> a;
    if (1 <= a and a < 400)
      mp[0]++;
    else if (400 <= a and a < 800)
      mp[1]++;
    else if (800 <= a and a < 1200)
      mp[2]++;
    else if (1200 <= a and a < 1600)
      mp[3]++;
    else if (1600 <= a and a < 2000)
      mp[4]++;
    else if (2000 <= a and a < 2400)
      mp[5]++;
    else if (2400 <= a and a < 2800)
      mp[6]++;
    else if (2800 <= a and a < 3200)
      mp[7]++;
    else
      mp[8]++;
  }
  if (!mp.count(8))
    cout << mp.size() << " " << mp.size() << endl;
  else
    cout << mp.size() - 1 << " " << min(8ll, (long long)mp.size() - 1ll + mp[8])
         << endl;
  return 0;
}
