#include <bits/stdc++.h>
using namespace std;
constexpr long long int INFLL = 1001001001001001LL;
constexpr int INF = 1000000007;
const int mod = 1000000007;
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() {
  long long n;
  cin >> n;
  long long a;
  map<long long, long long> iro;
  bool flag = false;
  long long cnt = 1;
  long long ziyuu = 0;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    iro[a]++;
  }
  while (cnt < 3200) {
    for (int i = 0; i < 399; i++) {
      if (iro[cnt]) {
        flag = true;
      }
      cnt++;
    }
    if (flag) {
      sum++;
    }
    flag = false;
  }
  while (cnt < 5000) {
    for (int i = 0; i <= 2000; i++) {
      ziyuu += iro[cnt];
      cnt++;
    }
  }
  if (sum == 0 && ziyuu > 0) {
    cout << "1" << endl;
  } else {
    cout << sum;
  }
  cout << " ";
  if (sum + ziyuu > 8) {
    cout << "8" << endl;
  } else {
    cout << sum + ziyuu << endl;
  }
}
