#include <bits/stdc++.h>
using namespace std;
int tong[10];
int main() {
  int n, i, g;
  memset(tong, 0, sizeof(tong));
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> g;
    if (g >= 1 && g < 400)
      tong[1] = 1;
    else if (g >= 400 && g < 800)
      tong[2] = 1;
    else if (g >= 800 && g < 1200)
      tong[3] = 1;
    else if (g >= 1200 && g < 1600)
      tong[4] = 1;
    else if (g >= 1600 && g < 2000)
      tong[5] = 1;
    else if (g >= 2000 && g < 2400)
      tong[6] = 1;
    else if (g >= 2400 && g < 2800)
      tong[7] = 1;
    else if (g >= 2800 && g < 3200)
      tong[8] = 1;
    else if (g >= 3200 && g <= 4800)
      tong[9]++;
  }
  int sum = 0;
  for (i = 1; i <= 8; i++)
    if (tong[i]) sum++;
  int min = sum, max = sum;
  if ((8 - sum) <= tong[9])
    max = 8;
  else
    max = sum + tong[8];
  if (sum == 0 && tong[9]) min = 1;
  cout << min << " " << max << endl;
  return 0;
}
