#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int gray = 0;
  int blown = 0;
  int green = 0;
  int sblue = 0;
  int blue = 0;
  int yellow = 0;
  int orange = 0;
  int red = 0;
  int free = 0;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int n;
    cin >> n;
    if (n < 400) {
      gray++;
    } else if (n < 800) {
      blown++;
    } else if (n < 1200) {
      green++;
    } else if (n < 1600) {
      sblue++;
    } else if (n < 2000) {
      blue++;
    } else if (n < 2400) {
      yellow++;
    } else if (n < 2800) {
      orange++;
    } else if (n < 3200) {
      red++;
    } else {
      free++;
    }
  }
  if (0 < gray) {
    ans++;
  }
  if (0 < blown) {
    ans++;
  }
  if (0 < green) {
    ans++;
  }
  if (0 < sblue) {
    ans++;
  }
  if (0 < blue) {
    ans++;
  }
  if (0 < yellow) {
    ans++;
  }
  if (0 < orange) {
    ans++;
  }
  if (0 < red) {
    ans++;
  }
  cout << ans << " " << ans + free << endl;
}
