#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using mti = vector<vector<int>>;
using vl = vector<ll>;
using mtl = vector<vector<ll>>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
int main() {
  int N;
  cin >> N;
  set<int> s;
  int cnt = 0;
  for (int i = 0; i < (int)(N); i++) {
    int a;
    cin >> a;
    if (a <= 399)
      s.insert(1);
    else if (a <= 799)
      s.insert(2);
    else if (a <= 1199)
      s.insert(3);
    else if (a <= 1599)
      s.insert(4);
    else if (a <= 1999)
      s.insert(5);
    else if (a <= 2399)
      s.insert(6);
    else if (a <= 2799)
      s.insert(7);
    else if (a <= 3199)
      s.insert(8);
    else
      cnt++;
  }
  cout << cnt << endl;
  if (s.size() == 0)
    cout << 1 << " ";
  else
    cout << s.size() << " ";
  int k = 1;
  while (1) {
    if (cnt == 0) break;
    if (!s.count(k)) {
      s.insert(k);
      cnt--;
    }
    k++;
  }
  cout << s.size();
}
