#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<string, int> mp;
  int others = 0;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    if (1 <= a && a <= 399)
      mp["gray"]++;
    else if (400 <= a && a <= 799)
      mp["brown"]++;
    else if (800 <= a && a <= 1199)
      mp["green"]++;
    else if (1200 <= a && a <= 1599)
      mp["skyblue"]++;
    else if (1600 <= a && a <= 1999)
      mp["blue"]++;
    else if (2000 <= a && a <= 2399)
      mp["yellow"]++;
    else if (2400 <= a && a <= 2799)
      mp["orange"]++;
    else if (2800 <= a && a <= 3199)
      mp["red"]++;
    else
      others++;
  }
  int count = 0;
  for (auto itr : mp) {
    if (mp[itr.first] > 0) count++;
  }
  int min, max = 0;
  min = count;
  if (count + others <= 8)
    max = count + others;
  else
    max = 8;
  cout << min << ' ' << max << endl;
  return 0;
}
