#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, v, cnt = 0, free = 0;
  cin >> n;
  vector<bool> color(8, false);
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  for (int i = 0; i < n; i++) {
    if (a.at(i) < 400)
      color.at(0) = true;
    else if (a.at(i) < 800)
      color.at(1) = true;
    else if (a.at(i) < 1200)
      color.at(2) = true;
    else if (a.at(i) < 1600)
      color.at(3) = true;
    else if (a.at(i) < 2000)
      color.at(4) = true;
    else if (a.at(i) < 2400)
      color.at(5) = true;
    else if (a.at(i) < 2800)
      color.at(6) = true;
    else if (a.at(i) < 3200)
      color.at(7) = true;
    else if (3200 <= a.at(i))
      free++;
  }
  for (int i = 0; i < 8; i++)
    if (color.at(i) == true) cnt++;
  if (free < cnt) cout << cnt << ' ' << cnt + free << endl;
  if (free >= cnt) cout << free << ' ' << cnt + free << endl;
}
