#include <bits/stdc++.h>
using namespace std;
long double PI = acosl(-1);
bool compare_int(int a, int b) { return (a > b); }
bool compare_string(string a, string b) { return a.size() < b.size(); }
bool compare_pair(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.second == b.second)
    return a.first > b.first;
  else
    return (a.second > b.second);
}
int fx[9] = {0, 0, -1, 1, -1, -1, 1, 1};
int fy[9] = {-1, 1, 0, 0, -1, 1, -1, 1};
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int color[8] = {0}, n, x, ext = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x >= 3200)
      ext++;
    else if (x >= 1 and x < 400)
      color[0]++;
    else if (x >= 400 and x < 800)
      color[1]++;
    else if (x >= 800 and x < 1200)
      color[2]++;
    else if (x >= 1200 and x < 1600)
      color[3]++;
    else if (x >= 1600 and x < 2000)
      color[4]++;
    else if (x >= 2000 and x < 2400)
      color[5]++;
    else if (x >= 2400 and x < 2800)
      color[6]++;
    else if (x >= 2800 and x < 3200)
      color[7]++;
  }
  int ans = 0;
  for (int i = 0; i < 8; i++) {
    if (color[i] > 0) ans++;
  }
  int v = min(ans, ext);
  ext -= v;
  cout << ans + ext << ' ' << ans + v + ext << endl;
}
