#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> dict(256, 0);
  int num;
  cin >> num;
  int min = 0;
  int max = 0;
  for (int i = 0; i < num; i++) {
    int cur;
    cin >> cur;
    if (cur > 4800) {
      continue;
    }
    if (cur >= 3200) {
      max++;
    } else if (dict[cur / 400] == 0) {
      dict[cur / 400] = 1;
      min++;
      max++;
    }
  }
  cout << min << " " << max;
}
