#include <bits/stdc++.h>
using namespace std;
void Main() {
  int n, god = 0, minc = 0;
  cin >> n;
  vector<bool> color(8, false);
  for (int i = 0; i < (int)(n); i++) {
    int a;
    cin >> a;
    if (a < 400)
      color.at(0) = true;
    else if (a < 800)
      color.at(1) = true;
    else if (a < 1200)
      color.at(2) = true;
    else if (a < 1600)
      color.at(3) = true;
    else if (a < 2000)
      color.at(4) = true;
    else if (a < 2400)
      color.at(5) = true;
    else if (a < 2800)
      color.at(6) = true;
    else if (a < 3200)
      color.at(7) = true;
    else
      god++;
  }
  for (int i = 0; i < (int)(8); i++)
    if (color.at(i)) minc++;
  cout << minc << " " << (minc + god >= 8 ? 8 : minc + god) << endl;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  Main();
  return 0;
}
