#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  cin >> n;
  map<char, int> mp;
  int ha = 0;
  for (i = 0; i < n; ++i) {
    int a;
    cin >> a;
    char j;
    if (a < 400) {
      j = 'h';
      mp[j]++;
    } else if (a >= 400 && a <= 799) {
      j = 't';
      mp[j]++;
    } else if (a >= 800 && a <= 1199) {
      j = 'm';
      mp[j]++;
    } else if (a >= 1200 && a <= 1599) {
      j = 'i';
      mp[j]++;
    } else if (a >= 1600 && a <= 1999) {
      j = 'a';
      mp[j]++;
    } else if (a >= 2000 && a <= 2399) {
      j = 'k';
      mp[j]++;
    } else if (a >= 2400 && a <= 2799) {
      j = 'd';
      mp[j]++;
    } else if (a >= 2800 && a <= 3199) {
      j = 'r';
      mp[j]++;
    } else {
      ha++;
    }
  }
  int ans = 0;
  if (mp.size() > 0) {
    ans = mp.size();
    if (ans + ha > 8) {
      cout << ans << " " << '8' << endl;
    } else {
      cout << ans << " " << ans + ha << endl;
    }
  } else if (mp.size() == 0) {
    ans = 1;
    if (ans + ha > 8) {
      cout << ans << " "
           << "8" << endl;
    } else {
      cout << ans << ans + ha - 1 << endl;
    }
  }
  return 0;
}
