#include <bits/stdc++.h>
using namespace std;
int n, a, mn = 0, mx = 0;
bool flag = false;
map<string, int> color;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  color["gray"] = 0;
  color["brown"] = 0;
  color["green"] = 0;
  color["cyan"] = 0;
  color["blue"] = 0;
  color["yellow"] = 0;
  color["orange"] = 0;
  color["red"] = 0;
  color["above"] = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a >= 1 && a <= 399) {
      color["gray"]++;
    } else if (a <= 799 && a >= 400) {
      color["brown"]++;
    } else if (a <= 1199 && a >= 800) {
      color["green"]++;
    } else if (a <= 1599 && a >= 1200) {
      color["cyan"]++;
    } else if (a <= 1999 && a >= 1600) {
      color["blue"]++;
    } else if (a <= 2399 && a >= 2000) {
      color["yellow"]++;
    } else if (a <= 2799 && a >= 2400) {
      color["orange"]++;
    } else if (a <= 3199 && a >= 2800) {
      color["red"]++;
    } else {
      color["above"]++;
    }
  }
  for (auto it = color.begin(); it != color.end(); ++it) {
    if (it->first != "above" && it->second != 0) {
      mn++;
      flag = true;
    }
  }
  if (color["above"] > 0) {
    for (int i = 1; i <= color["above"]; i++) {
      for (auto j = color.begin(); j != color.end(); ++j) {
        if (j->first != "above" && j->second == 0) {
          j->second = 1;
          mx++;
          break;
        }
      }
    }
  }
  if (flag == true)
    cout << mn << ' ' << mn + mx;
  else
    cout << 1 << ' ' << mx;
  return 0;
}
