#include <bits/stdc++.h>
using namespace std;
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
void YES() { cout << "YES" << endl; }
void NO() { cout << "NO" << endl; }
const double PI = acos(-1);
void solve() {
  int n;
  cin >> n;
  vector<int> A(9, 0);
  for (int i = 0, i_len = (n); i < i_len; ++i) {
    int a;
    cin >> a;
    if (1 <= a && a <= 399) A[0]++;
    if (400 <= a && a <= 799) A[1]++;
    if (800 <= a && a <= 1199) A[2]++;
    if (1200 <= a && a <= 1599) A[3]++;
    if (1600 <= a && a <= 1999) A[4]++;
    if (2000 <= a && a <= 2399) A[5]++;
    if (2400 <= a && a <= 2799) A[6]++;
    if (2800 <= a && a <= 3199) A[7]++;
    if (3200 <= a) A[8]++;
  }
  int cnt = 0;
  for (int i = 0, i_len = (8); i < i_len; ++i) {
    if (A[i] != 0) cnt++;
  }
  if (A[8] != 0) {
    if (cnt >= A[8])
      cout << cnt << " " << cnt + A[8] << endl;
    else
      cout << A[8] << " " << cnt + A[8] << endl;
  } else {
    cout << cnt << " " << cnt << endl;
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
}
