#include <bits/stdc++.h>
int cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
  int n;
  int a[3000];
  while (scanf("%d", &n) != EOF) {
    int t;
    for (t = 0; t < n; t++) {
      scanf("%d", &a[t]);
    }
    qsort(a, n, sizeof(a[0]), cmp);
    int flag = 0;
    int gray = 0;
    int brown = 0;
    int grenn = 0;
    int cyan = 0;
    int blue = 0;
    int yellow = 0;
    int orange = 0;
    int red = 0;
    for (t = 0; t < n; t++) {
      if (a[t] >= 1 && a[t] <= 399)
        gray++;
      else if (a[t] >= 400 && a[t] <= 799)
        brown++;
      else if (a[t] >= 800 && a[t] <= 1199)
        grenn++;
      else if (a[t] >= 1200 && a[t] <= 1599)
        cyan++;
      else if (a[t] >= 1600 && a[t] <= 1999)
        blue++;
      else if (a[t] >= 2000 && a[t] <= 2399)
        yellow++;
      else if (a[t] >= 2400 && a[t] <= 2799)
        orange++;
      else if (a[t] >= 2800 && a[t] <= 3199)
        red++;
      else if (a[t] >= 3200)
        flag++;
    }
    int sum = 0;
    if (gray > 0) sum++;
    if (brown > 0) sum++;
    if (grenn > 0) sum++;
    if (cyan > 0) sum++;
    if (blue > 0) sum++;
    if (yellow > 0) sum++;
    if (orange > 0) sum++;
    if (red > 0) sum++;
    if (sum != 0)
      printf("%d ", sum);
    else
      printf("1 ");
    if (flag > 0) {
      if (sum < 8) sum = sum + flag;
      if (sum >= 8) sum = 8;
    }
    printf("%d\n", sum);
    for (t = 0; t < n; t++) {
      a[t] = 0;
    }
  }
  return 0;
}
