#include <bits/stdc++.h>
using namespace std;
int main() {
  map<string, bool> colors;
  colors["ash"] = false;
  colors["tea"] = false;
  colors["green"] = false;
  colors["water"] = false;
  colors["blue"] = false;
  colors["yerrow"] = false;
  colors["dai"] = false;
  colors["red"] = false;
  int N, over = 0;
  cin >> N;
  vector<int> a(N, 0);
  for (int i = 0; i < N; i++) cin >> a[i];
  for (int i = 0; i < N; i++) {
    if (a[i] <= 399)
      colors["ash"] = true;
    else if (a[i] <= 799)
      colors["tea"] = true;
    else if (a[i] <= 1199)
      colors["green"] = true;
    else if (a[i] <= 1599)
      colors["water"] = true;
    else if (a[i] <= 1999)
      colors["blue"] = true;
    else if (a[i] <= 2399)
      colors["yerrow"] = true;
    else if (a[i] <= 2799)
      colors["dai"] = true;
    else if (a[i] <= 3199)
      colors["red"] = true;
    else
      over++;
  }
  int res_min = 0, res_max = 0;
  for (pair<string, bool> p : colors) {
    if (p.second) {
      res_min++;
      res_max++;
    }
  }
  if (over == 0) {
    cout << res_min << " " << res_max << endl;
    return 0;
  }
  if (res_min == 0) res_min = 1;
  res_max += over;
  if (res_max >= 8) res_max = 8;
  cout << res_min << " " << res_max << endl;
}
