#include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1000000007;
uint64_t gcd(uint64_t m, uint64_t n) {
  uint64_t temp;
  while (m % n != 0) {
    temp = n;
    n = m % n;
    m = temp;
  }
  return n;
}
uint64_t lcm(uint64_t m, uint64_t n) {
  uint64_t g = gcd(m, n);
  if (m % g == 0) return (m / g) * n;
  if (n % g == 0) return (n / g) * m;
  return (m * n) / gcd(m, n);
}
void comb(vector<vector<uint64_t> > &v) {
  for (uint64_t i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (uint64_t k = 1; k < v.size(); k++) {
    for (uint64_t j = 1; j < k; j++) {
      v[k][j] = (v[k - 1][j - 1] + v[k - 1][j]);
    }
  }
}
bool is_product_overflow(uint64_t a, uint64_t b) {
  uint64_t prod = a * b;
  return (prod / b != a);
}
void primeFactorization(uint64_t a, list<uint64_t> &factors) {
  long i, sq;
  if (a % 2 == 0) {
    factors.push_back(2);
    primeFactorization(a / 2, factors);
    return;
  }
  sq = sqrt(a);
  for (i = 3; i <= sq; i += 2) {
    if (a % i == 0) {
      factors.push_back(i);
      primeFactorization(a / i, factors);
      return;
    }
  }
  if (a != 1) {
    factors.push_back(a);
  }
}
int64_t modinv(int64_t a, int64_t m) {
  int64_t b = m, u = 1, v = 0;
  while (b) {
    int64_t t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
signed main() {
  int n;
  cin >> n;
  vector<int> rank;
  rank.push_back(399);
  rank.push_back(799);
  rank.push_back(1199);
  rank.push_back(1599);
  rank.push_back(1999);
  rank.push_back(2399);
  rank.push_back(2799);
  rank.push_back(3199);
  map<int, int> numR;
  int a;
  int numOverRed = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    for (int j = 0; j < rank.size(); j++) {
      if (a <= rank[j]) {
        numR[j]++;
        break;
      } else if (j == rank.size() - 1) {
        numOverRed++;
      }
    }
  }
  int minNum = numR.size();
  if (minNum == 0 && numOverRed >= 1) {
    minNum = 1;
  }
  int maxNum = rank.size();
  if (numR.size() + numOverRed < maxNum) {
    maxNum = numR.size() + numOverRed;
  }
  cout << minNum << " " << maxNum << endl;
  return 0;
}
