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