#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long int MOD = 1000000007;
inline void add(long long int& x, long long int y) {
  x += y;
  if (x >= MOD) x -= MOD;
  if (x < 0) x += MOD;
}
inline long long int mul(long long int x, long long int y) {
  return ((long long int)x * y) % MOD;
}
long long int gcd(long long int a, long long int b) {
  if (b) return gcd(b, a % b);
  return a;
}
long long int power(long long int a, long long int p) {
  long long int ret = 1;
  while (p) {
    if (p & 1) ret = mul(ret, a);
    a = mul(a, a);
    p /= 2;
  }
  return ret;
}
long long int phi(long long int n) {
  long long int ret = n;
  long long int i = 2;
  if (n % i == 0) {
    ret -= ret / i;
    while (n % i == 0) n /= i;
  }
  for (i = 3; i * i <= n; i++)
    if (n % i == 0) {
      ret -= ret / i;
      while (n % i == 0) n /= i;
    }
  if (n > 1) ret -= ret / n;
  return ret;
}
int main() {
  vector<pair<pair<long long int, long long int>, long long int> > a;
  for (long long int i = 0; i <= 3199; i += 400)
    a.push_back(make_pair(make_pair(max(1ll, i), i + 399), 0));
  long long int n, c, z = 0;
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    ;
    scanf("%lld", &c);
    ;
    for (__typeof(a.begin()) j = (a).begin(); j != (a).end(); j++) {
      long long int v1 = (*j).first.first, v2 = (*j).first.second;
      if (c >= v1 && c <= v2) {
        (*j).second++;
        break;
      }
    }
    if (c > 3199) z++;
  }
  long long int ct = 0;
  for (__typeof(a.begin()) i = (a).begin(); i != (a).end(); i++) {
    if ((*i).second > 0) ct++;
  }
  cout << max(1ll, ct) << " " << min(8ll, ct + z) << endl;
  return 0;
}
