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