#include <bits/stdc++.h>
using namespace std;
int main() {
  long long gray = 0, brown = 0, green = 0, cyan = 0, blue = 0, yellow = 0,
            orange = 0, red = 0;
  long long N = 0;
  long long n;
  scanf("%lld", &n);
  for (long long i = 0; i < n; i++) {
    long long x;
    scanf("%lld", &x);
    if (x >= 1 && x <= 399)
      gray++;
    else if (x >= 400 && x <= 799)
      brown++;
    else if (x >= 800 && x <= 1199)
      green++;
    else if (x >= 1200 && x <= 1599)
      cyan++;
    else if (x >= 1600 && x <= 1999)
      blue++;
    else if (x >= 2000 && x <= 2399)
      yellow++;
    else if (x >= 2400 && x <= 2799)
      orange++;
    else if (x >= 2800 && x <= 3199)
      red++;
    else
      N++;
  }
  long long C = 0;
  C += (gray > 0);
  C += (brown > 0);
  C += (green > 0);
  C += (cyan > 0);
  C += (blue > 0);
  C += (yellow > 0);
  C += (orange > 0);
  C += (red > 0);
  if (N == 0)
    cout << C << " " << C << endl;
  else
    cout << C << " " << C + min(N, (8 - C)) << endl;
  return 0;
}
