#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {-1, 0, 0, 1};
const int dy[4] = {0, -1, 1, 0};
long long fact(long long n) {
  long long res = 1;
  for (long long i = 2; i <= n; ++i) res = res * i;
  return res;
}
long long nCr(long long n, long long r) {
  return (fact(n) / fact(n - r) * fact(r));
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const long long MOD = 1e9 + 7;
const long long INF = 1LL << 60;
const int inf = 1 << 30;
int N;
int a[100000];
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> N;
  for (int i = 0; i < (int)(N); ++i) cin >> a[i];
  map<string, bool> mp;
  int freeC = 0;
  for (int i = 0; i < N; i++) {
    if (1 <= a[i] && a[i] <= 399)
      mp["gray"] = true;
    else if (400 <= a[i] && a[i] <= 799)
      mp["brown"] = true;
    else if (800 <= a[i] && a[i] <= 1199)
      mp["green"] = true;
    else if (1200 <= a[i] && a[i] <= 1599)
      mp["aqua"] = true;
    else if (1600 <= a[i] && a[i] <= 1999)
      mp["blue"] = true;
    else if (2000 <= a[i] && a[i] <= 2399)
      mp["yellow"] = true;
    else if (2400 <= a[i] && a[i] <= 2799)
      mp["orange"] = true;
    else if (2800 <= a[i] && a[i] <= 3199)
      mp["red"] = true;
    else
      freeC++;
  }
  int ans = 0;
  for (auto m : mp) {
    if (m.second > 0) ans++;
  }
  printf("%d %d\n", ans, ans + freeC);
  return 0;
}
