#include <bits/stdc++.h>
using namespace std;
int static fast = []() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  return 0;
}();
int main() {
  vector<int> arr = {399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 9999};
  int n, val;
  cin >> n;
  unordered_map<int, int> color;
  for (int i = 0; i < n; i++) {
    cin >> val;
    auto it = lower_bound(arr.begin(), arr.end(), val);
    color[distance(arr.begin(), it)] += 1;
  }
  if (color.count(8) == 0) {
    cout << color.size() << " " << color.size() << "\n";
  } else {
    cout << color.size() - 1 << " " << min(int(color.size()) + color[8] - 1, 8)
         << "\n";
  }
  return 0;
}
