#include <bits/stdc++.h>
using namespace std;
struct Double {
  double d;
  explicit Double(double x) : d(x) {}
};
ostream& operator<<(ostream& os, const Double x) {
  os << fixed << setprecision(20) << x.d;
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& vec) {
  os << "[";
  for (const auto& v : vec) {
    os << v << ",";
  }
  os << "]";
  return os;
}
template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
constexpr double eps = 1e-10;
constexpr long long mod = 1e9 + 7;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  int q = 0;
  vector<int> v(8, 0);
  for (int i = 0; i < N; i++) {
    if (a[i] < 400) {
      v[0]++;
    } else if (a[i] < 800) {
      v[1]++;
    } else if (a[i] < 1200) {
      v[2]++;
    } else if (a[i] < 1600) {
      v[3]++;
    } else if (a[i] < 2000) {
      v[4]++;
    } else if (a[i] < 2400) {
      v[5]++;
    } else if (a[i] < 2800) {
      v[6]++;
    } else if (a[i] < 3200) {
      v[7]++;
    } else {
      q++;
    }
  }
  int x = *min_element((v).begin(), (v).end());
  int y = *max_element((v).begin(), (v).end());
  int c = 0;
  for (int i = 0; i < 8; i++)
    if (v[i] > 0) c++;
  cout << min(1, c) << " " << c + q << endl;
}
