#include <bits/stdc++.h>
using namespace std;
class Task {
 private:
  int inserted = 0;

 public:
  void addColor(int ai, unordered_set<int> *col, int curColIndex) {
    if (ai <= 399)
      col->insert(0);
    else if (400 <= ai && ai <= 799)
      col->insert(1);
    else if (800 <= ai && ai <= 1199)
      col->insert(2);
    else if (1200 <= ai && ai <= 1599)
      col->insert(3);
    else if (1600 <= ai && ai <= 1999)
      col->insert(4);
    else if (2000 <= ai && ai <= 2399)
      col->insert(5);
    else if (2400 <= ai && ai <= 2799)
      col->insert(6);
    else if (2800 <= ai && ai <= 3199)
      col->insert(7);
    else {
      col->insert(curColIndex);
      inserted++;
    }
  }
  void solve(istream &in, ostream &out) {
    int N, ai;
    int currentExtraNumber = 8;
    unordered_set<int> col;
    in >> N;
    for (int i = 0; i < N; ++i) {
      in >> ai;
      addColor(ai, &col, currentExtraNumber);
      currentExtraNumber++;
    }
    cout << col.size() - inserted << " " << col.size();
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  istream &in(cin);
  ostream &out(cout);
  Task t;
  t.solve(in, out);
  return 0;
}
