#include <bits/stdc++.h>
using namespace std;
int c[9] = {0};
int main(void) {
  int n, ans = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (1 <= a && a < 400)
      c[0] = 1;
    else if (400 <= a && a < 800)
      c[1] = 1;
    else if (800 <= a && a < 1200)
      c[2] = 1;
    else if (1200 <= a && a < 1600)
      c[3] = 1;
    else if (1600 <= a && a < 2000)
      c[4] = 1;
    else if (2000 <= a && a < 2400)
      c[5] = 1;
    else if (2400 <= a && a < 2800)
      c[6] = 1;
    else if (2800 <= a && a < 3200)
      c[7] = 1;
    else if (3200 <= a && a <= 4800)
      c[8]++;
  }
  for (int i = 0; i < 8; i++) ans += c[i];
  if (ans == 0) ans = 1;
  cout << ans << " " << ans + c[8] << endl;
}
