#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
const int INF = 0x3f3f3f3f;
const long long INFLL = 9223372036854775807;
const int MOD = 1e9 + 7;
const double PI = 2.0 * asin(1.0);
int N, t;
bool flag[10];
int main() {
  while (cin >> N) {
    memset(flag, false, sizeof(flag));
    int n = 0;
    for (int i = 0; i < N; i++) {
      cin >> t;
      if (t < 400)
        flag[0] = true;
      else if (t < 800)
        flag[0] = true;
      else if (t < 1200)
        flag[1] = true;
      else if (t < 1600)
        flag[2] = true;
      else if (t < 2000)
        flag[3] = true;
      else if (t < 2400)
        flag[4] = true;
      else if (t < 2800)
        flag[5] = true;
      else if (t < 3200)
        flag[6] = true;
      else
        n++;
    }
    int num = 0;
    cout << n << endl;
    for (int i = 0; i < 7; i++) {
      if (flag[i]) num++;
    }
    if (n)
      cout << num << ' ' << min(8, num + n) << endl;
    else
      cout << num << ' ' << num << endl;
  }
  return 0;
}
