#include <bits/stdc++.h>
using namespace std;
int main(void) {
  vector<int> border = {3200, 2800, 2400, 2000, 1600, 1200, 800, 400};
  int N;
  cin >> N;
  map<int, int> m;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    for (int j = 0; j < border.size(); j++) {
      if (border[j] <= a) {
        m[j]++;
        break;
      }
    }
  }
  int free_color = m[0];
  int cnt = m.size() - 1;
  cout << cnt << " " << min(8, cnt + free_color) << endl;
  return 0;
}
