#include <bits/stdc++.h>
int up(const void *a, const void *b) {
  return *(long long *)a - *(long long *)b;
}
void sortup(long long *a, int n) { qsort(a, n, sizeof(long long), up); }
int main(void) {
  long long N;
  scanf("%lld", &N);
  long long a[N + 5];
  for (long long i = (0); i < (N); i += (1)) {
    scanf("%lld", &a[i]);
  }
  sortup(a, N);
  long long low = 1, high = 1;
  for (long long i = (0); i < (N); i += (1)) {
    if (a[i] < 400 && 400 <= a[i + 1]) {
      low++;
      high = low;
    } else if (a[i] < 800 && 800 <= a[i + 1]) {
      low++;
      high = low;
    } else if (a[i] < 1200 && 1200 <= a[i + 1]) {
      low++;
      high = low;
    } else if (a[i] < 1600 && 1600 <= a[i + 1]) {
      low++;
      high = low;
    } else if (a[i] < 2000 && 2000 <= a[i + 1]) {
      low++;
      high = low;
    } else if (a[i] < 2400 && 2400 <= a[i + 1]) {
      low++;
      high = low;
    } else if (a[i] < 2800 && 2800 <= a[i + 1]) {
      low++;
      high = low;
    } else if (a[i] < 3200 && 3200 <= a[i + 1]) {
      if (N - i - 1 < 8 - low)
        high = low + (N - i - 1);
      else
        high = 8;
    } else if (3200 <= a[0]) {
      low = 1;
      if (N >= 8)
        high = 8;
      else
        high = N;
    }
  }
  printf("%lld %lld\n", low, high);
  return 0;
}
