#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;
const long long MOD = 1000000007;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long getDigit(long long n) {
  long long cnt = 0;
  while (n != 0) {
    n /= 10;
    cnt++;
  }
  return cnt;
}
int main() {
  long long n, cnt = 0;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (n); ++i) cin >> a[i];
  map<string, long long> mp;
  for (long long i = 0; i < (n); ++i) {
    if (1 <= a[i] && a[i] <= 399)
      mp["gray"]++;
    else if (400 <= a[i] && a[i] <= 799)
      mp["brown"]++;
    else if (800 <= a[i] && a[i] <= 1199)
      mp["green"]++;
    else if (1200 <= a[i] && a[i] <= 1599)
      mp["aqua"]++;
    else if (1600 <= a[i] && a[i] <= 1999)
      mp["blue"]++;
    else if (2000 <= a[i] && a[i] <= 2399)
      mp["yellow"]++;
    else if (2400 <= a[i] && a[i] <= 2799)
      mp["orange"]++;
    else if (2800 <= a[i] && a[i] <= 3199)
      mp["red"]++;
    else
      cnt++;
  }
  cout << mp.size() << " " << min(mp.size() + cnt, (unsigned long long)8)
       << endl;
}
