#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const double eps = 1e-10;
const int MAX = 200000;
int main() {
  int n, sum, min, max, up = 0;
  vector<int> v;
  std::vector<int> color{0, 0, 0, 0, 0, 0, 0, 0};
  cin >> n;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    v.push_back(t);
  }
  std::sort(v.begin(), v.end());
  for (int x : v) {
    sum = std::accumulate(color.begin(), color.end(), 0);
    if (sum >= 8) {
      min = 8;
      max = 8;
      break;
    }
    if (x < 400) {
      color.at(0) = 1;
    } else if (x < 800) {
      color.at(1) = 1;
    } else if (x < 1200) {
      color.at(2) = 1;
    } else if (x < 1600) {
      color.at(3) = 1;
    } else if (x < 2000) {
      color.at(4) = 1;
    } else if (x < 2400) {
      color.at(5) = 1;
    } else if (x < 2800) {
      color.at(6) = 1;
    } else if (x < 3200) {
      color.at(7) = 1;
    } else {
      up++;
    }
  }
  if (sum + up >= 8) {
    max = 8;
  } else {
    max = sum + up;
  }
  min = sum;
  cout << min << " " << max << endl;
  return 0;
}
