#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt8 = 0;
  int n, a[10007], i, sum = 0, j, mn = 0, mx = 0, cnt = 0, cnt1 = 0, cnt2 = 0,
                      cnt3 = 0, cnt4 = 0, cnt5 = 0, cnt6 = 0, cnt7 = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    if (a[i] >= 1 && a[i] <= 399) {
      cnt++;
    }
    if (a[i] >= 400 && a[i] <= 799) {
      cnt1++;
    }
    if (a[i] >= 800 && a[i] <= 1199) {
      cnt2++;
    }
    if (a[i] >= 1200 && a[i] <= 1599) {
      cnt3++;
    }
    if (a[i] >= 1600 && a[i] <= 1999) {
      cnt4++;
    }
    if (a[i] >= 2000 && a[i] <= 2399) {
      cnt5++;
    }
    if (a[i] >= 2400 && a[i] <= 2799) {
      cnt6++;
    }
    if (a[i] >= 2800 && a[i] <= 3199) {
      cnt7++;
    }
    if (a[i] >= 3200) {
      cnt8++;
    }
  }
  if (cnt >= 1) {
    mn = mn + 1;
  }
  if (cnt1 >= 1) {
    mn = mn + 1;
  }
  if (cnt2 >= 1) {
    mn = mn + 1;
  }
  if (cnt3 >= 1) {
    mn = mn + 1;
  }
  if (cnt4 >= 1) {
    mn = mn + 1;
  }
  if (cnt5 >= 1) {
    mn = mn + 1;
  }
  if (cnt6 >= 1) {
    mn = mn + 1;
  }
  if (cnt7 >= 1) {
    mn = mn + 1;
  }
  if (mn == 8) {
    cout << 8 << " " << 8;
  }
  if (mn == 0) {
    if (mn + cnt8 <= 8) {
      mx = mn + cnt8;
      cout << mn << " " << n;
    } else
      cout << 1 << " " << n;
  } else if (mn + cnt8 < 8) {
    mx = mn + cnt8;
    if (mx > 8) {
      cout << mn << " " << n;
    } else
      cout << mn << " " << mn + cnt8;
  }
}
