#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 5;
const long long mod = 1e9 + 7;
const int INF = INT_MAX;
const long long INFCAD = long long(INT_MAX) * 2 + 1;
const double E = 1e-9;
const int M = 201;
int main() {
  map<pair<int, int>, int> m;
  m[pair<int, int>(1, 399)] = 1;
  m[pair<int, int>(400, 799)] = 1;
  m[pair<int, int>(800, 1199)] = 1;
  m[pair<int, int>(1200, 1599)] = 1;
  m[pair<int, int>(1600, 1999)] = 1;
  m[pair<int, int>(2000, 2399)] = 1;
  m[pair<int, int>(2400, 2799)] = 1;
  m[pair<int, int>(2800, 3199)] = 1;
  int n;
  cin >> n;
  vector<int> arr;
  for (int i = 0; i < n; i += 1) {
    int x;
    cin >> x;
    bool flag = 1;
    for (auto j = m.begin(); j != m.end(); j++) {
      pair<int, int> aux = j->first;
      if (aux.first <= x && x <= aux.second) {
        m[j->first]++;
        flag = 0;
      }
    }
    if (flag) arr.push_back(x);
  }
  int mx = 0;
  for (auto i = m.begin(); i != m.end(); i++) {
    pair<int, int> a = i->first;
    if (i->second > 1) mx++;
  }
  int mn = 0;
  if (int(arr.size()) == n)
    mn = 1;
  else
    mn = mx;
  int auxi = int(m.size()) - mx;
  int df = int(arr.size());
  if (df > auxi)
    mx = 8;
  else
    mx += df;
  cout << mn << " " << mx << endl;
  return 0;
}
