#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[105];
  cin >> n;
  string s[105];
  map<string, int> mp;
  int cnt = 0, cnt1 = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 400) {
      s[i] = "gray";
    } else if (a[i] < 800) {
      s[i] = "brown";
    } else if (a[i] < 1200) {
      s[i] = "green";
    } else if (a[i] < 1600) {
      s[i] = "cyan";
    } else if (a[i] < 2000) {
      s[i] = "blue";
    } else if (a[i] < 2400) {
      s[i] = "yellow";
    } else if (a[i] < 2800) {
      s[i] = "orange";
    } else if (a[i] < 3200) {
      s[i] = "red";
    } else {
      cnt++;
      s[i] = "a";
    }
    cnt1 += (mp[s[i]] == 0 && s[i] != "a");
    mp[s[i]]++;
  }
  cout << cnt1 << " " << cnt1 + min(8 - cnt1, cnt) << endl;
  return 0;
}
