#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
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 int INF = 1e9;
const long long MOD = 1000000007;
using Graph = vector<vector<int>>;
long long gcd(long long a, long long b) { return (a % b) ? gcd(b, a % b) : b; }
long long modPow(long long x, long long n) {
  if (n == 0) return 1;
  long long res = modPow(x * x % MOD, n / 2);
  if (n & 1) res = res * x % MOD;
  return res;
}
long long mul(long long l, long long r) {
  long long ret = 1;
  for (int i = 0; i < l - r + 1; ++i) {
    ret *= i + r;
    ret %= MOD;
  }
  return ret;
}
long long com(long long n, long long k) {
  long long ret1 = mul(n, n - k + 1);
  long long ret2 = mul(k, 1);
  long long ret3 = modPow(ret2, MOD - 2);
  return ret1 * ret3 % MOD;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  set<string> tmp;
  int cnt = 0;
  for (int i = 0; i < (n); i++) {
    if (a[i] >= 1 && a[i] <= 399) tmp.insert("gry");
    if (a[i] >= 400 && a[i] <= 799) tmp.insert("bro");
    if (a[i] >= 800 && a[i] <= 1199) tmp.insert("grn");
    if (a[i] >= 1200 && a[i] <= 1599) tmp.insert("rb");
    if (a[i] >= 1600 && a[i] <= 1999) tmp.insert("bl");
    if (a[i] >= 2000 && a[i] <= 2399) tmp.insert("ora");
    if (a[i] >= 2400 && a[i] <= 2799) tmp.insert("ye");
    if (a[i] >= 2800 && a[i] <= 3199) tmp.insert("red");
    if (a[i] >= 3200) cnt++;
  }
  int mxi = tmp.size() + cnt;
  int mni = tmp.size();
  cout << mni << " " << mxi << "\n";
}
