#include <bits/stdc++.h>
using llint = long long;
using VI = std::vector<int>;
using PII = std::pair<int, int>;
using SI = std::set<int>;
using MII = std::map<int, int>;
using TIII = std::tuple<int, int, int>;
using namespace std;
int N;
int col[8];
int M = 0;
int judge(int a) {
  if (1 <= a && a <= 399) return 0;
  if (400 <= a && a <= 799) return 1;
  if (800 <= a && a <= 1199) return 2;
  if (1200 <= a && a <= 1599) return 3;
  if (1600 <= a && a <= 1999) return 4;
  if (2000 <= a && a <= 2399) return 5;
  if (2400 <= a && a <= 2799) return 6;
  if (2800 <= a && a <= 3199) return 7;
  return -1;
}
void solve() {
  int ansm = 0;
  for (int(i) = (int)(0); (i) < (int)(8); ++(i)) ansm += col[i];
  cout << ansm << ' ' << ansm + M << endl;
}
signed main() {
  cin >> N;
  for (int(i) = (int)(0); (i) < (int)(N); ++(i)) {
    int a;
    cin >> a;
    if (judge(a) != -1)
      col[judge(a)] = 1;
    else
      M++;
  }
  solve();
  return 0;
}
