#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void sort_uniq(T& c) {
  sort(ALL(c));
  c.erase(unique(ALL(c)), c.end());
}
template <class T>
istream& operator>>(istream& s, vector<T>& v) {
  for (T& x : v) {
    s >> x;
  }
  return s;
}
template <class T>
void cout_v(const vector<T>& c) {
  for (int i = 0; i < c.size(); i++) cout << c[i] << endl;
}
template <class K, class V>
void cout_v(map<K, V>& m) {
  for (auto it = m.begin(); it != m.end(); it++)
    cout << it->first << ":" << it->second << endl;
}
template <class T>
void cout_h(const vector<T>& c) {
  for (int i = 0; i < c.size(); i++)
    cout << c[i] << (i == c.size() - 1 ? "\n" : " ");
}
template <class T>
inline bool chmin(T& a, T b) {
  return a > b ? a = b, true : false;
}
template <class T>
inline bool chmax(T& a, T b) {
  return a < b ? a = b, true : false;
}
inline int powi(int x, int y) {
  int p = 1;
  while (y--) p *= x;
  return p;
}
template <class T>
inline bool is_overlap(const T& a, const T& b, const T& p, const T& q) {
  return p <= b && a <= q;
}
void yes(bool f) { cout << (f ? "yes" : "no") << endl; }
void Yes(bool f) { cout << (f ? "Yes" : "No") << endl; }
void YES(bool f) { cout << (f ? "YES" : "NO") << endl; }
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> a(N);
  cin >> a;
  vector<int> n(9, 0);
  for (int i = 0; i < (N); i++) {
    if (a[i] >= 3200)
      n.back()++;
    else
      n[a[i] / 400]++;
  }
  cout_v(n);
  int beyond_red = 0;
  for (int i = 0; i < (n.size() - 1); i++)
    if (n[i]) beyond_red++;
  int le_red = n.back();
  int ans_min;
  int ans_max;
  if (beyond_red == 0) {
    if (le_red > 0)
      ans_min = 1;
    else
      ans_min = 0;
  } else {
    ans_min = beyond_red;
  }
  ans_max = le_red + beyond_red;
  cout << ans_min << " " << ans_max << endl;
}
