#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> X(8);
  int over = 0;
  for (int i = 0; i < N; i++) {
    int x;
    cin >> x;
    if (x < 400)
      X.at(0)++;
    else if (400 <= x & x < 800)
      X.at(1)++;
    else if (800 <= x & x < 1200)
      X.at(2)++;
    else if (1200 <= x & x < 1600)
      X.at(3)++;
    else if (1600 <= x & x < 2000)
      X.at(4)++;
    else if (2000 <= x & x < 2400)
      X.at(5)++;
    else if (2400 <= x & x < 2800)
      X.at(6)++;
    else if (2800 <= x & x < 3200)
      X.at(7)++;
    else if (3200 <= x)
      over++;
  }
  int minans = 0;
  int maxans;
  for (int i = 0; i < 8; i++) {
    if (X.at(i) >= 1) minans++;
  }
  maxans = minans + over;
  if (maxans > 8) maxans = 8;
  if (minans == 0 & over >= 1) minans = 1;
  cout << minans << ' ' << maxans << endl;
}
