#include <bits/stdc++.h>
int main() {
  int N;
  int a[1000];
  int b[1000];
  while (scanf("%d", &N) != EOF) {
    int i = 0, j = 0;
    for (i = 0; i < N; i++) scanf("%d", &a[i]);
    for (i = 0; i < N; i++) {
      for (j = i + 1; j < N; j++) {
        if (a[i] == a[j] && a[j] < 3200) a[j] = -1;
      }
    }
    int t = 0;
    for (i = 0; i < N; i++) {
      if (a[i] == -1) continue;
      b[t] = a[i];
      t++;
    }
    int max = 0;
    int min = 0;
    int c[10] = {0};
    for (i = 0; i < t; i++) {
      if (b[i] >= 1 && b[i] <= 399)
        c[0] = 1;
      else if (b[i] >= 400 && b[i] <= 799)
        c[1] = 1;
      else if (b[i] >= 800 && b[i] <= 1199)
        c[2] = 1;
      else if (b[i] >= 1200 && b[i] <= 1599)
        c[3] = 1;
      else if (b[i] >= 1600 && b[i] <= 1999)
        c[4] = 1;
      else if (b[i] >= 2000 && b[i] <= 2399)
        c[5] = 1;
      else if (b[i] >= 2400 && b[i] <= 2799)
        c[6] = 1;
      else if (b[i] >= 2800 && b[i] <= 3199)
        c[7] = 1;
      else
        max++;
    }
    for (i = 0; i < 9; i++) {
      if (c[i] != 0) min += c[i];
    }
    if (max == 0)
      max = min;
    else
      max += min;
    printf("%d %d\n", min, max);
  }
  return 0;
}
