#include <bits/stdc++.h>
using namespace std;
map<string, long> mp;
int main() {
  long i, j, t, a, b, n, c, temp;
  t = 1;
  while (t--) {
    cin >> n;
    long arr[n];
    for (i = 0; i < n; i++) cin >> arr[i];
    for (i = 0; i < n; i++) {
      temp = arr[i];
      if (temp < 400) {
        mp["gray"]++;
      } else if (temp < 800) {
        mp["brown"]++;
      } else if (temp < 1200) {
        mp["green"]++;
      } else if (temp < 1600) {
        mp["cyan"]++;
      } else if (temp < 2000) {
        mp["blue"]++;
      } else if (temp < 2400) {
        mp["yellow"]++;
      } else if (temp < 2800) {
        mp["orange"]++;
      } else if (temp < 3200) {
        mp["red"]++;
      } else {
        mp["ex"]++;
      }
    }
    long cou = 0;
    for (auto x : mp) {
      if (x.second != 0L && x.first != "ex") cou++;
    }
    temp = 0;
    temp = mp["ex"];
    cout << max(cou, 1L) << " " << min(8L, cou + temp);
  }
}
