#include <bits/stdc++.h>
using namespace std;
int64_t power(int64_t a, int64_t b) {
  int64_t ans = 1;
  while (b) {
    if (b & 1) {
      ans = (ans * a) % 1000000007;
    }
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return ans;
}
int64_t mmi(int64_t n) { return power(n, 1000000007 - 2); }
int64_t two(int64_t n) { return 1 << n; }
void onbit(int64_t &n, int64_t x) { n |= two(x); }
void offbit(int64_t &n, int64_t x) { n &= ~two(x); }
int64_t cntbit(int64_t n) {
  int64_t res = 0;
  while (n and ++res) n -= n & -n;
  return res;
}
int64_t dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
int64_t n, mpp[10];
void solve() {
  int64_t i, n;
  cin >> n;
  for (i = 0; i < n; i++) {
    int64_t x;
    cin >> x;
    if (x >= 1 and x <= 399)
      mpp[0]++;
    else if (x >= 400 and x <= 799)
      mpp[1]++;
    else if (x >= 800 and x <= 1199)
      mpp[2]++;
    else if (x >= 1200 and x <= 1599)
      mpp[3]++;
    else if (x >= 1600 and x <= 1999)
      mpp[4]++;
    else if (x >= 2000 and x <= 2399)
      mpp[5]++;
    else if (x >= 2400 and x <= 2799)
      mpp[6]++;
    else if (x >= 2800 and x <= 3199)
      mpp[7]++;
    else
      mpp[8]++;
  }
  int64_t mini = 0, maxx = 0;
  for (i = 0; i < 8; i++) {
    if (mpp[i] == 0) continue;
    mini++;
    maxx++;
  }
  int64_t p = 8;
  maxx = min(maxx + mpp[8] % 8, p);
  cout << mini << " " << maxx;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int64_t t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
