#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a.at(i);
  int count = 0;
  int cou = 0;
  for (int i = 0; i < n; ++i) {
    if (0 < a.at(i) && a.at(i) < 3200) {
      count++;
    } else if (3200 <= a.at(i)) {
      cou++;
    }
  }
  cout << count << " " << count + cou << endl;
  return 0;
}
