#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
int main() {
  enum Color {
    gray = 399,
    brown = 799,
    green = 1199,
    aqua = 1599,
    blue = 1999,
    yellow = 2399,
    orange = 2799,
    red = 3199,
    freedom
  };
  Color All[] = {gray, brown, green, aqua, blue, yellow, orange, red, freedom};
  int N;
  cin >> N;
  vector<int> A(N);
  map<Color, int> MAP;
  for (int i = 0; i < ((int)(N)); i++) {
    cin >> A.at(i);
    auto c = lower_bound(begin(All), end(All), A[i]);
    MAP[*c]++;
  }
  int mi, ma;
  if (MAP.count(Color::freedom) > 0) {
    int num = MAP.size() - 1;
    int free = MAP[Color::freedom];
    ma = min(8, num + free);
    mi = num;
  } else {
    mi = ma = MAP.size();
  }
  cout << mi << " " << ma << endl;
}
