#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int flag[8] = {0};
  int godCount = 0;
  for (int i = 0; i < n; i++) {
    int tmp;
    scanf("%d", &tmp);
    if (tmp < 3200) flag[((tmp) < (2800) ? (tmp) : (2800)) / 400] = 1;
    if (tmp >= 3200) godCount++;
  }
  int ans = 0;
  for (int i = 0; i < 8; i++)
    if (flag[i]) ans++;
  printf("%d %d\n", (ans == 0 ? 1 : ans),
         ((8) < (ans + godCount) ? (8) : (ans + godCount)));
  return 0;
}
