#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1LL << 60;
long long MOD = 1000000007;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> a(n), cnt(8);
  for (long long i = 0; i < (n); ++i) cin >> a[i];
  bool flag = false;
  for (long long i = 0; i < (n); ++i) {
    if (a[i] <= 399)
      cnt[0]++;
    else if (a[i] <= 799)
      cnt[1]++;
    else if (a[i] <= 1199)
      cnt[2]++;
    else if (a[i] <= 1599)
      cnt[3]++;
    else if (a[i] <= 1999)
      cnt[4]++;
    else if (a[i] <= 2399)
      cnt[5]++;
    else if (a[i] <= 2799)
      cnt[6]++;
    else if (a[i] <= 3199)
      cnt[7]++;
    else if (!flag) {
      flag = true;
      for (long long k = 0; k < (cnt.size()); ++k) cnt[k]++;
    } else
      continue;
  }
  vector<long long> cnt2(cnt);
  for (long long i = 0; i < (cnt2.size()); ++i)
    cnt2[i] <= 0 ? cnt2[i] : cnt2[i]--;
  cnt.erase(remove((cnt).begin(), (cnt).end(), 0), cnt.end());
  cnt2.erase(remove((cnt2).begin(), (cnt2).end(), 0), cnt2.end());
  cout << cnt.size() << " " << cnt2.size() << endl;
}
