#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = (1 << 28);
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1},
          Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
int n, b;
map<int, int> m;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n;
  int count = 0;
  for (int i = 0; i < n; i++) {
    cin >> b;
    if (b / 400 > 7) {
      m[8]++;
    } else if (m[b / 400] == 0) {
      count++;
      m[b / 400] = 1;
    } else {
      m[b / 400] = 1;
    }
  }
  cout << count << "\n";
  while (m[8] > 0) {
    if (count == 8) break;
    m[8]--;
    count++;
    if (count == 8) break;
  }
  cout << count << "\n";
}
