#include <bits/stdc++.h>
using namespace std;
int c[10] = {0};
int main() {
  int n, min = 0, max = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a < 400)
      c[0] = 1;
    else if (400 <= a && a < 800)
      c[1] = 1;
    else if (800 <= a && a < 1200)
      c[2] = 1;
    else if (1200 <= a && a < 1600)
      c[3] = 1;
    else if (1600 <= a && a < 2000)
      c[4] = 1;
    else if (2000 <= a && a < 2400)
      c[5] = 1;
    else if (2400 <= a && a < 2800)
      c[6] = 1;
    else if (2800 <= a && a < 3200)
      c[7] = 1;
    else if (3200 <= a)
      max++;
  }
  for (int i = 0; i < 8; i++) min += c[i];
  max += min;
  cout << min << " " << max << endl;
}
