#include <bits/stdc++.h>
using namespace std;
int n, cnt;
set<string> rate;
int main(void) {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (1 <= x && x <= 399)
      rate.insert("gray");
    else if (400 <= x && x <= 799)
      rate.insert("brown");
    else if (800 <= x && x <= 1199)
      rate.insert("green");
    else if (1200 <= x && x <= 1599)
      rate.insert("lblue");
    else if (1600 <= x && x <= 1999)
      rate.insert("blue");
    else if (2000 <= x && x <= 2399)
      rate.insert("yellow");
    else if (2400 <= x && x <= 2799)
      rate.insert("orange");
    else if (2800 <= x && x <= 3199)
      rate.insert("red");
    else if (3200 <= x)
      cnt++;
  }
  int min = (int)rate.size();
  int max = min + cnt;
  if (min == 0) {
    min = 1;
    max = 1;
  }
  cout << min << " " << max << endl;
  return 0;
}
