#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, atual, gray = 0, brown = 0, green = 0, cyan = 0, blue = 0, yellow = 0,
                orange = 0, red = 0, any = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> atual;
    if ((atual < 400) && (gray == 0)) {
      gray++;
    } else if (((atual < 800) && (atual >= 400)) && (brown == 0)) {
      brown++;
    } else if (((atual < 1200) && (atual >= 800)) && (green == 0)) {
      green++;
    } else if (((atual < 1600) && (atual >= 1200)) && (cyan == 0)) {
      cyan++;
    } else if (((atual < 2000) && (atual >= 1600)) && (blue == 0)) {
      blue++;
    } else if (((atual < 2400) && (atual >= 2000)) && (yellow == 0)) {
      yellow++;
    } else if (((atual < 2800) && (atual >= 2400)) && (orange == 0)) {
      orange++;
    } else if (((atual < 3200) && (atual >= 2800)) && (red == 0)) {
      red++;
    } else if (atual >= 3200) {
      any++;
    }
  }
  int min = gray + brown + green + cyan + blue + yellow + orange + red;
  int max = gray + brown + green + cyan + blue + yellow + orange + red + any;
  if (min == 0) {
    min = max;
  }
  cout << min << " " << max;
}
