#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A;
  int a, b, c, d, e, f, g, h, j;
  a = 0;
  b = 0;
  c = 0;
  d = 0;
  e = 0;
  f = 0;
  g = 0;
  h = 0;
  j = 0;
  for (int i = 0; i < N; i++) {
    cin >> A;
    if (1 <= A && A < 400)
      a++;
    else if (400 <= A && A < 800)
      b++;
    else if (800 <= A && A < 1200)
      c++;
    else if (1200 <= A && A < 1600)
      d++;
    else if (1600 <= A && A < 2000)
      e++;
    else if (2000 <= A && A < 2400)
      f++;
    else if (2400 <= A && A < 2800)
      g++;
    else if (2800 <= A && A < 3200)
      h++;
    else
      j++;
  }
  int mn = 0;
  int mx = 0;
  if (a > 0) mn++;
  if (b > 0) mn++;
  if (c > 0) mn++;
  if (d > 0) mn++;
  if (e > 0) mn++;
  if (f > 0) mn++;
  if (g > 0) mn++;
  if (h > 0) mn++;
  if (j > 0)
    mx = mn + j;
  else
    mx = mn;
  cout << mn << " " << mx << endl;
}
