#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000000 + 10;
int n;
int a[MAXN];
int t[] = {1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 50000};
int k[9];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 0; j < 8; j++) {
      if (a[i] >= t[j] && a[i] < t[j + 1]) {
        k[j] = 1;
      }
    }
    if (a[i] >= t[8]) {
      k[8]++;
    }
  }
  int r = 0;
  for (int i = 0; i < 8; i++) r += k[i];
  int mi = r;
  int ma = r + k[8];
  cout << mi << " " << ma << "\n";
  return 0;
}
