#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int inf = 1e9;
const long long INF = 1e18;
const double pi = 3.14159265358979323846;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> gl, bw, gr, se, bl, y, o, r, w;
  for (int i = 0; i < n; i++) {
    if (a[i] < 400)
      gl.push_back(a[i]);
    else if (a[i] < 800)
      bw.push_back(a[i]);
    else if (a[i] < 1200)
      gr.push_back(a[i]);
    else if (a[i] < 1600)
      se.push_back(a[i]);
    else if (a[i] < 2000)
      bl.push_back(a[i]);
    else if (a[i] < 2400)
      y.push_back(a[i]);
    else if (a[i] < 2800)
      o.push_back(a[i]);
    else if (a[i] < 3200)
      r.push_back(a[i]);
    else
      w.push_back(a[i]);
  }
  int cnt = 0;
  if (gl.size() > 0) cnt++;
  if (bw.size() > 0) cnt++;
  if (gr.size() > 0) cnt++;
  if (se.size() > 0) cnt++;
  if (bl.size() > 0) cnt++;
  if (y.size() > 0) cnt++;
  if (o.size() > 0) cnt++;
  if (r.size() > 0) cnt++;
  if (cnt >= 8)
    cout << 8 << " ";
  else if (cnt != 0)
    cout << cnt << " ";
  else
    cout << 1 << " ";
  if (cnt >= 8)
    cout << 8 << "\n";
  else if (cnt + w.size() >= 8)
    cout << 8 << "\n";
  else
    cout << cnt + w.size() << "\n";
}
