#include <bits/stdc++.h>
using namespace std;
bool vis[100000] = {0};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m;
  int hh[100000] = {0};
  int sum = 0, num = 7, su[8] = {0};
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> hh[i];
  }
  for (int i = 1; i <= n; i++) {
    if (hh[i] < 400 && !su[0]) {
      sum++;
      num--;
      su[0] = 1;
    } else if (hh[i] < 800 && !su[1] && hh[i] >= 400) {
      sum++;
      num--;
      su[1] = 1;
    } else if (hh[i] < 1200 && !su[2] && hh[i] >= 800) {
      sum++;
      num--;
      su[2] = 1;
    } else if (hh[i] < 1600 && !su[3] && hh[i] >= 1200) {
      sum++;
      num--;
      su[3] = 1;
    } else if (hh[i] < 2000 && !su[4] && hh[i] >= 1600) {
      sum++;
      num--;
      su[4] = 1;
    } else if (hh[i] < 2400 && !su[5] && hh[i] >= 2000) {
      sum++;
      num--;
      su[5] = 1;
    } else if (hh[i] < 2800 && !su[6] && hh[i] >= 2400) {
      sum++;
      num--;
      su[6] = 1;
    } else if (hh[i] < 3200 && !su[7] && hh[i] >= 2800) {
      sum++;
      num--;
      su[7] = 1;
    } else if (hh[i] >= 3200 && num > 0) {
      num--;
    }
  }
  cout << sum << " " << 7 - num << endl;
  return 0;
}
