#include <bits/stdc++.h>
using namespace std;
const long long MINF = -10e10;
const int INF = INT_MAX;
const int mod = 1000000007;
const string gray = "gray", brown = "brown", green = "green",
             light_blue = "light_blue", blue = "blue", yellow = "yellow",
             orange = "orange", red = "red";
bool between(int a, int mi, int ma) { return mi <= a && a <= ma; }
int main() {
  int over_count = 0;
  int n;
  cin >> n;
  set<string> colors = {
      gray, brown, green, light_blue, blue, yellow, orange, red,
  };
  for (long long i = 0; i < (n); ++i) {
    int a;
    cin >> a;
    if (between(a, 1, 399)) {
      colors.erase(gray);
    } else if (between(a, 400, 799)) {
      colors.erase(brown);
    } else if (between(a, 800, 1199)) {
      colors.erase(green);
    } else if (between(a, 1200, 1599)) {
      colors.erase(light_blue);
    } else if (between(a, 1600, 1999)) {
      colors.erase(blue);
    } else if (between(a, 2000, 2399)) {
      colors.erase(yellow);
    } else if (between(a, 2400, 2799)) {
      colors.erase(orange);
    } else if (between(a, 2800, 3199)) {
      colors.erase(red);
    } else {
      over_count++;
    }
  }
  int current_size = 8 - colors.size();
  { cout << max(1, current_size) << ' '; }
  { cout << min(8, current_size + over_count) << endl; }
}
