#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, cnt = 0, genius = 0;
  bool gray = true, brown = true, green = true, lightblue = true, blue = true,
       yellow = true, orange = true, red = true;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    if (tmp >= 3200) {
      genius++;
    } else if (tmp >= 2800 && tmp < 3200 && red) {
      cnt++;
      red = false;
    } else if (tmp >= 2400 && tmp < 2800 && orange) {
      cnt++;
      orange = false;
    } else if (tmp >= 2000 && tmp < 2400 && yellow) {
      cnt++;
      yellow = false;
    } else if (tmp >= 1600 && tmp < 2000 && blue) {
      cnt++;
      blue = false;
    } else if (tmp >= 1200 && tmp < 1600 && lightblue) {
      cnt++;
      lightblue = false;
    } else if (tmp >= 800 && tmp < 1200 && green) {
      cnt++;
      green = false;
    } else if (tmp >= 400 && tmp < 800 && brown) {
      cnt++;
      brown = false;
    } else if (tmp < 400 && gray) {
      cnt++;
      gray = false;
    }
  }
  if (cnt == 0) {
    cout << genius << " " << 1;
    return 0;
  }
  cout << cnt << " " << min(cnt + genius, 8);
  return 0;
}
