#include <bits/stdc++.h>
using namespace std;
int main(void) {
  vector<int> col(8);
  int fr = 0;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (((1) <= a && a <= (399)))
      col[0]++;
    else if (((400) <= a && a <= (799)))
      col[1]++;
    else if (((800) <= a && a <= (1199)))
      col[2]++;
    else if (((1200) <= a && a <= (1599)))
      col[3]++;
    else if (((1600) <= a && a <= (1999)))
      col[4]++;
    else if (((2000) <= a && a <= (2399)))
      col[5]++;
    else if (((2400) <= a && a <= (2799)))
      col[6]++;
    else if (((2800) <= a && a <= (3199)))
      col[7]++;
    else if (((3200) <= a && a <= (5000)))
      fr++;
  }
  int cnt1 = 0;
  for (int i = 0; i < col.size(); i++) {
    if (col[i]) cnt1++;
  }
  cout << cnt1 << ' ';
  cout << cnt1 + fr << endl;
}
