#include <bits/stdc++.h>
using namespace std;
map<string, long long int> mp;
int main() {
  long long int n, i, j, k, a, b, x, y, p = 8, d, c = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a;
    if (a >= 1 && a <= 399) {
      mp["gray"]++;
    } else if (a >= 400 && a <= 799) {
      mp["brown"]++;
    } else if (a >= 800 && a <= 1199) {
      mp["green"]++;
    } else if (a >= 1200 && a <= 1599) {
      mp["cyan"]++;
    } else if (a >= 1600 && a <= 1999) {
      mp["blue"]++;
    } else if (a >= 2000 && a <= 2399) {
      mp["yellow"]++;
    } else if (a >= 2400 && a <= 2799) {
      mp["orange"]++;
    } else if (a >= 2800 && a <= 3199) {
      mp["red"]++;
    } else
      c++;
  }
  x = mp.size();
  if (x == 0) {
    x = min(c, p);
    cout << 1 << " " << x << endl;
    return 0;
  }
  if (x == 8) {
    cout << x << " " << x << endl;
  } else {
    p = p - x;
    d = x + min(c, p);
    cout << x << " " << d << endl;
  }
  return 0;
}
