#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool PN(T x) {
  if (x <= 1) return false;
  if (x == 2) return true;
  for (int i = 2; i < sqrt(x) + 1; i++)
    if (x % i == 0) return false;
  return true;
}
const long long MOD = 1e9 + 7;
long long Comb(int n, int i) {
  long long ans = 1;
  if (i == 0 || i == n)
    return 1;
  else {
    for (int j = 1; j <= i; ++j) {
      ans *= (n + 1 - j);
      ans /= j;
      ans %= MOD;
    }
  }
  return ans;
}
void solve() {
  int n;
  cin >> n;
  int range[8] = {};
  int red = 0;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    cout << a << endl;
    int ch = a / 400;
    range[ch] = 1;
    if (a >= 3200) {
      red++;
    }
  }
  int s = 0;
  for (int i = 0; i < 8; ++i) {
    if (range[i]) s++;
  }
  int m;
  int M;
  if (s == 0)
    m = 1;
  else
    m = s;
  M = s + red;
  if (M > 8) M = 8;
  cout << m << " " << M << endl;
}
int main() {
  solve();
  return 0;
}
