#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > vec;
map<pair<int, int>, bool> mp;
int main() {
  int a = 1, b = 399, i;
  for (i = 0; i < 8; i++) {
    vec.push_back({a, b});
    if (i == 0)
      a += 399;
    else
      a += 400;
    b += 400;
  }
  int n, x, j, cnt = 0;
  cin >> n;
  for (j = 1; j <= n; j++) {
    cin >> x;
    bool f = false;
    for (i = 0; i < vec.size(); i++) {
      if (x >= vec[i].first && x <= vec[i].second) {
        mp[{vec[i].first, vec[i].second}] = true;
        f = true;
        break;
      }
    }
    if (!f) cnt++;
  }
  int cnt2 = 0;
  for (i = 0; i < vec.size(); i++) {
    if (mp[{vec[i].first, vec[i].second}]) cnt2++;
  }
  cout << cnt2 << " " << cnt + cnt2 << endl;
  mp.clear();
  vec.clear();
  return 0;
}
