#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, x = 0, M = 0;
  scanf("%d", &n);
  int num[n], color[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
  for (i = 0; i < n; i++) scanf("%d", &num[i]);
  sort(num, num + n);
  for (i = 0; i < n; i++) {
    if (num[i] >= 1 && num[i] < 400) color[0]++;
    if (num[i] >= 400 && num[i] < 800) color[1]++;
    if (num[i] >= 800 && num[i] < 1200) color[2]++;
    if (num[i] >= 1200 && num[i] < 1600) color[3]++;
    if (num[i] >= 1600 && num[i] < 2000) color[4]++;
    if (num[i] >= 2000 && num[i] < 2400) color[5]++;
    if (num[i] >= 2400 && num[i] < 2800) color[6]++;
    if (num[i] >= 2800 && num[i] < 3200) color[7]++;
    if (num[i] >= 3200) x++;
  }
  for (i = 0; i < 8; i++)
    if (color[i] != 0) M++;
  if (M == 0 && x >= 8)
    cout << 1 << ' ' << 8 << endl;
  else if (M == 0 && x < 8)
    cout << 1 << ' ' << x << endl;
  else {
    if (M + x >= 8)
      cout << M << ' ' << 8 << endl;
    else
      cout << M << ' ' << M + x << endl;
  }
  return 0;
}
