#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 = 8, su[8] = {0};
  while (cin >> n) {
    for (int i = 1; i <= n; i++) {
      cin >> hh[i];
    }
    int fagl = 0;
    for (int i = 1; i <= n; i++) {
      if (hh[i] >= 1 && hh[i] < 400) {
        su[0] = 1;
      } else if (hh[i] < 800) {
        su[1] = 1;
      } else if (hh[i] < 1200) {
        su[2] = 1;
      } else if (hh[i] < 1600) {
        su[3] = 1;
      } else if (hh[i] < 2000) {
        su[4] = 1;
      } else if (hh[i] < 2400) {
        su[5] = 1;
      } else if (hh[i] < 2800) {
        su[6] = 1;
      } else if (hh[i] < 3200) {
        su[7] = 1;
      } else if (hh[i] >= 3200) {
        su[8]++;
      }
    }
    for (int i = 0; i < 8; i++) {
      if (su[i]) sum++;
    }
    if (!sum)
      cout << 1 << " " << su[8];
    else
      cout << sum;
    cout << " " << sum + su[8] << endl;
  }
  return 0;
}
