#include <bits/stdc++.h>
using namespace std;
template <typename T>
using keyVal = pair<string, T>;
template <typename T>
bool val_greater(const keyVal<T>& left, const keyVal<T>& right) {
  return left.second > right.second;
}
vector<string> split(string str, char sep) {
  vector<string> v;
  stringstream ss(str);
  string t;
  while (getline(ss, t, sep)) v.push_back(t);
  return v;
}
vector<string> re_search_g(string s, regex re) {
  vector<string> ret;
  smatch mc;
  auto it = s.cbegin();
  while (regex_search(it, s.cend(), mc, re)) {
    ret.push_back(mc[0]);
    it += mc.position(0) + mc.length();
  }
  return ret;
}
void init_global_C() {}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = int(0); i < int(N); ++i) cin >> a[i];
  vector<char> c(4801, '?');
  for (int i = int(1); i < int(4801); ++i) {
    if (i <= 399)
      c[i] = 'h';
    else if (i <= 799)
      c[i] = 'c';
    else if (i <= 1199)
      c[i] = 'g';
    else if (i <= 1599)
      c[i] = 'm';
    else if (i <= 1999)
      c[i] = 'b';
    else if (i <= 2399)
      c[i] = 'y';
    else if (i <= 2799)
      c[i] = 'o';
    else if (i <= 3199)
      c[i] = 'r';
    else
      c[i] = '?';
  }
  set<char> st;
  int cnt = 0;
  for (int i = int(0); i < int(N); ++i) {
    if (3200 <= a[i])
      cnt++;
    else
      st.insert(c[a[i]]);
  }
  int lo = st.size();
  int hi = lo + cnt;
  cout << lo << " " << hi << endl;
  return 0;
}
