#include <bits/stdc++.h>
using namespace std;
signed main() {
  set<int> s;
  int cnt = 0;
  cin.tie(0);
  ios::sync_with_stdio(false);
  int hoge, piyo;
  cin >> hoge;
  for (int i = 0; i < hoge; ++i) {
    cin >> piyo;
    if (piyo >= 3200) {
      ++cnt;
    } else {
      s.insert((piyo) / 400);
      cout << (piyo) / 400 << endl;
    }
  }
  int a = (s.size() == 0);
  cout << a + s.size() << " " << s.size() + cnt << endl;
}
