#include <bits/stdc++.h>
using namespace std;
signed main() {
  long N;
  cin >> N;
  long A = 0;
  long B = 0;
  long C = 0;
  long D = 0;
  long E = 0;
  long F = 0;
  long G = 0;
  long H = 0;
  long I = 0;
  for (long i = 0; i < N; i++) {
    long S;
    cin >> S;
    if (1 <= S && S <= 399) {
      A++;
    } else if (400 <= S && S <= 799) {
      B++;
    } else if (800 <= S && S <= 1199) {
      C++;
    } else if (1200 <= S && S <= 1599) {
      D++;
    } else if (1600 <= S && S <= 1999) {
      E++;
    } else if (2000 <= S && S <= 2399) {
      F++;
    } else if (2400 <= S && S <= 2799) {
      G++;
    } else if (2800 <= S && S <= 3199) {
      H++;
    } else {
      I++;
      if (I > 8) {
        I = 8;
      }
    }
  }
  long answer = 0;
  if (A != 0) {
    answer++;
  }
  if (B != 0) {
    answer++;
  }
  if (C != 0) {
    answer++;
  }
  if (D != 0) {
    answer++;
  }
  if (E != 0) {
    answer++;
  }
  if (F != 0) {
    answer++;
  }
  if (G != 0) {
    answer++;
  }
  if (H != 0) {
    answer++;
  }
  if (answer == 0 && I != 0) {
    if (I > 8) {
      cout << 1 << " " << 8 << endl;
    } else {
      cout << 1 << " " << I << endl;
    }
  } else if (answer != 0 && I == 0) {
    cout << answer << " " << answer << endl;
  } else {
    if (answer + I > 8) {
      cout << answer << " " << 8 << endl;
    } else {
      cout << answer << " " << N << endl;
    }
  }
}
