#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
int N, ans;
int cnt;
bool color[8];
int main(void) {
  cin >> N;
  for (int i = 0; i < N; i++) {
    int c = 0;
    cin >> c;
    if (c < 400)
      color[0] = true;
    else if (c < 800)
      color[1] = true;
    else if (c < 1200)
      color[2] = true;
    else if (c < 1600)
      color[3] = true;
    else if (c < 2000)
      color[4] = true;
    else if (c < 2400)
      color[5] = true;
    else if (c < 2800)
      color[6] = true;
    else if (c < 3200)
      color[7] = true;
    else if (c >= 3200)
      cnt++;
  }
  int kaunt = count(color, color + 8, true);
  cout << kaunt << " " << min(kaunt + cnt, 8) << endl;
  return 0;
}
