#include <bits/stdc++.h>
using namespace std;
enum class Color {
  Gray,
  Blown,
  Green,
  Aqua,
  Blue,
  Yellow,
  Orange,
  Red,
  Purple,
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  set<Color> dict;
  int free_color = 0;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    Color color;
    if (a <= 399) {
      color = Color::Gray;
    } else if (a <= 799) {
      color = Color::Blown;
    } else if (a <= 1199) {
      color = Color::Green;
    } else if (a <= 1599) {
      color = Color::Aqua;
    } else if (a <= 1999) {
      color = Color::Blue;
    } else if (a <= 2399) {
      color = Color::Yellow;
    } else if (a <= 2799) {
      color = Color::Orange;
    } else if (a <= 3199) {
      color = Color::Red;
    } else {
      color = Color::Purple;
      free_color++;
    }
    dict.insert(color);
  }
  int imin = 0, imax = 0;
  for (auto p : dict) {
    if (p != Color::Purple) {
      imin++;
      imax++;
    } else {
      imax += free_color;
    }
  }
  cout << imin << " " << imax << endl;
}
