#include <bits/stdc++.h>
using namespace std;
int n, tep, ax, ay;
int a[10];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &tep);
    if (1 <= tep && tep <= 399) a[1]++;
    if (400 <= tep && tep <= 799) a[2]++;
    if (800 <= tep && tep <= 1199) a[3]++;
    if (1200 <= tep && tep <= 1599) a[4]++;
    if (1600 <= tep && tep <= 1999) a[5]++;
    if (2000 <= tep && tep <= 2399) a[6]++;
    if (2400 <= tep && tep <= 2799) a[7]++;
    if (2800 <= tep && tep <= 3199) a[8]++;
    if (tep >= 3200) a[9]++;
  }
  for (int i = 1; i <= 8; i++) {
    if (a[i] != 0) ax++;
  }
  if (a[9] + ax >= 8)
    ay = 8;
  else
    ay = ax + a[9];
  printf("%d %d", ax, ay);
  return 0;
}
