#include <bits/stdc++.h>
using namespace std;
bool bt(long long a, long long b, long long c) { return c >= a && c <= b; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long rg[9];
  for (long long i = 0; i < 9; i++) rg[i] = 0;
  for (long long i = 0; i < n; i++) {
    if (bt(1, 399, a[i]))
      rg[0]++;
    else if (bt(400, 799, a[i]))
      rg[1]++;
    else if (bt(800, 1199, a[i]))
      rg[2]++;
    else if (bt(1200, 1599, a[i]))
      rg[3]++;
    else if (bt(1600, 1999, a[i]))
      rg[4]++;
    else if (bt(2000, 2399, a[i]))
      rg[5]++;
    else if (bt(2400, 2799, a[i]))
      rg[6]++;
    else if (bt(2800, 3199, a[i]))
      rg[7]++;
    else if (bt(3200, 4800, a[i]))
      rg[8]++;
  }
  long long cnt = 0, mi, ma;
  for (long long i = 0; i < 8; i++)
    if (rg[i]) cnt++;
  if (rg[8] && !cnt) {
    mi = 1;
    ma = min(rg[8], 8ll);
  } else {
    mi = cnt;
    ma = mi + min(rg[8], 8 - cnt);
  }
  cout << mi << " " << ma;
  return 0;
}
