#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  int b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0;
  int ex = 0;
  for (int q = 0; q < (n); ++q) {
    int a;
    cin >> a;
    if (1 <= a && a <= 399) {
      b = 1;
    } else if (a <= 799) {
      c = 1;
    } else if (a <= 1199) {
      d = 1;
    } else if (a <= 1599) {
      e = 1;
    } else if (a <= 1999) {
      f = 1;
    } else if (a <= 2399) {
      g = 1;
    } else if (a <= 2799) {
      h = 1;
    } else if (a <= 3199) {
      i = 1;
    } else {
      ex++;
    }
  }
  int ans = b + c + d + e + f + g + h + i;
  cout << ans << " ";
  if (ans + ex <= 8) {
    cout << ans + ex << endl;
  } else {
    cout << 8 << endl;
  }
  return 0;
}
