#include <bits/stdc++.h>
using namespace std;
bool any(const vector<int>& xs, int left, int right) {
  for (int i = left; i < right; ++i)
    if (xs[i]) return true;
  return false;
}
int accumulate(const vector<int>& xs, int left, int right) {
  int acc = 0;
  for (int i = left; i < right; ++i) acc += xs[i];
  return acc;
}
int main() {
  int N;
  cin >> N;
  vector<int> xs(4801);
  for (int i = 1; i <= N; ++i) {
    int a;
    cin >> a;
    ++xs[a];
  }
  int n_colored = 0;
  for (int i = 0; i < 8; ++i) {
    const int left = 400 * i;
    const int right = left + 400;
    n_colored += any(xs, left, right) ? 1 : 0;
  }
  const int n_wildcard = accumulate(xs, 3200, 4801);
  const int n_max = min(8, n_colored + n_wildcard);
  cout << n_colored << " " << n_max << endl;
}
