#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, x = 0, max, min;
  int a[101];
  bool gray, brawn, green, aqua, blue, yellow, orange, red;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (a[i] < 399) {
      gray = true;
    } else if (a[i] <= 799) {
      brawn = true;
    } else if (a[i] <= 1199) {
      green = true;
    } else if (a[i] <= 1599) {
      aqua = true;
    } else if (a[i] <= 1999) {
      blue = true;
    } else if (a[i] <= 2399) {
      yellow = true;
    } else if (a[i] <= 2799) {
      orange = true;
    } else if (a[i] <= 3199) {
      red = true;
    } else {
      x = x + 1;
    }
  }
  int truth = 0;
  if (gray == true) {
    truth = truth + 1;
  }
  if (green == true) {
    truth = truth + 1;
  }
  if (aqua == true) {
    truth = truth + 1;
  }
  if (blue == true) {
    truth = truth + 1;
  }
  if (yellow == true) {
    truth = truth + 1;
  }
  if (orange == true) {
    truth = truth + 1;
  }
  if (red == true) {
    truth = truth + 1;
  }
  if (x >= 1 && truth >= 1) {
    max = truth + x;
    min = truth;
  }
  if (x >= 1 && truth == 0) {
    max = x;
    min = 1;
  }
  if (x == 0 && truth >= 1) {
    max = truth;
    min = truth;
  }
  cout << min << ' ' << max << endl;
  return 0;
}
