#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<long long>;
using vl = vector<long long>;
using pii = pair<long long, long long>;
using pll = pair<long long, long long>;
const long long DX[9] = {0, 1, 0, -1, 1, 1, -1, -1, 0},
                DY[9] = {-1, 0, 1, 0, -1, 1, 1, -1, 0};
template <class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (auto i = begin(v); i != end(v); ++i)
    os << *i << (i == end(v) - 1 ? "" : "\n");
  return os;
}
template <class T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto i = begin(v); i != end(v); ++i) is >> *i;
  return is;
}
template <class T>
istream &operator>>(istream &is, pair<T, T> &p) {
  is >> p.first >> p.second;
  return is;
}
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
struct before_main_function {
  before_main_function() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << setprecision(15) << fixed;
  }
} before_main_function;
signed main() {
  long long n;
  cin >> n;
  vi a(n);
  cin >> a;
  vi cnt(8, 0);
  long long pro = 0;
  for (long long i = 0, ilen = (long long)(n); i < ilen; ++i) {
    if (1 <= a[i] && a[i] <= 399)
      cnt[0]++;
    else if (400 <= a[i] && a[i] <= 799)
      cnt[1]++;
    else if (800 <= a[i] && a[i] <= 1199)
      cnt[2]++;
    else if (1200 <= a[i] && a[i] <= 1599)
      cnt[3]++;
    else if (1600 <= a[i] && a[i] <= 1999)
      cnt[4]++;
    else if (2000 <= a[i] && a[i] <= 2399)
      cnt[5]++;
    else if (2400 <= a[i] && a[i] <= 2799)
      cnt[6]++;
    else if (2800 <= a[i] && a[i] <= 3199)
      cnt[7]++;
    else
      pro++;
  };
  long long ans = 0;
  for (long long i = 0, ilen = (long long)(8); i < ilen; ++i) {
    if (cnt[i] != 0) ans++;
  }
  if (ans == 8) {
    cout << "8 8" << endl;
  } else {
    cout << ans << " " << min(8ll, ans + pro) << endl;
  }
  return 0;
}
