#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
string converter(T n) {
  stringstream x;
  x << n;
  return x.str();
}
string itos(int a) {
  string s = to_string(a);
  return s;
}
template <class T>
T mod_pow(T x, T n) {
  T res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % 1000000007;
    x = x * x % 1000000007;
    n >>= 1;
  }
  return res;
}
std::vector<std::string> split(const std::string &str, char sep) {
  std::vector<std::string> v;
  std::stringstream ss(str);
  std::string buffer;
  while (std::getline(ss, buffer, sep)) {
    v.push_back(buffer);
  }
  return v;
}
struct edge {
  int from, to;
  long long cost;
};
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, -1, 0, 1};
bool mysort(pair<int, int> a, pair<int, int> b) { return a.second > b.second; }
int digit_sum(int n) {
  int p = n;
  int sum = 0;
  while (p > 0) {
    sum += p % 10;
    p = (p - p % 10) / 10;
  }
  return sum;
}
int _digit(long long int n) {
  int d = 0;
  while (n > 0) {
    d++;
    n = (n - n % 10) / 10;
  }
  return d;
}
int main(void) {
  int n;
  cin >> n;
  ;
  int a[n];
  unordered_map<int, int> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    m[min(a[i] / 400, 8)]++;
  }
  int ansm = 0, ansM = 0;
  for (auto &i : m) {
    if (i.first < 8) {
      ansm++;
    }
    if (i.first >= 8) {
      ansM += m[8];
    }
  }
  cout << max(ansm, 1) << " " << min(ansm + m[8], 8) << '\n';
  return 0;
}
