#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(9, 0);
  for (int i = 0; i < (n); i++) {
    int a;
    cin >> a;
    if (a < 400)
      v[0] = 1;
    else if (a >= 400 && a < 800)
      v[1] = 1;
    else if (a >= 800 && a < 1200)
      v[2] = 1;
    else if (a >= 1200 && a < 1600)
      v[3] = 1;
    else if (a >= 1600 && a < 2000)
      v[4] = 1;
    else if (a >= 2000 && a < 2400)
      v[5] = 1;
    else if (a >= 2400 && a < 2800)
      v[6] = 1;
    else if (a >= 2800 && a < 3100)
      v[7] = 1;
    else
      v[8]++;
  }
  int mn = 0;
  for (int i = 0; i < (8); i++) mn += v[i];
  cout << mn << " ";
  cout << accumulate((v).begin(), (v).end(), 0) << endl;
}
