#include <bits/stdc++.h>
using namespace std;
void newline() { cout << endl; }
template <typename T>
void display(T input) {
  cout << input;
}
template <typename T>
void put(T input) {
  display(input);
  newline();
}
void iput(int input) { put(input); }
int gray = 0;
int brown = 0;
int green = 0;
int aqua = 0;
int blue = 0;
int yellow = 0;
int orange = 0;
int red = 0;
int other = 0;
void select_color(int rate) {
  rate <= 399    ? gray++
  : rate <= 799  ? brown++
  : rate <= 1199 ? green++
  : rate <= 1599 ? aqua++
  : rate <= 1999 ? blue++
  : rate <= 2399 ? yellow++
  : rate <= 2799 ? orange++
  : rate <= 3199 ? red++
                 : other++;
}
auto main() -> int {
  int n;
  vector<int> a;
  cin >> n;
  for (int unsafe_cnt = 0; unsafe_cnt < n; unsafe_cnt++) {
    int in;
    cin >> in;
    select_color(in);
  }
  int min = 0;
  int max = 0;
  vector<int> v = {gray, brown, green, aqua, blue, yellow, orange, red};
  for (auto iter = v.begin(); iter != v.end(); iter++) {
    if (*iter != 0) {
      min++;
    }
  }
  max = min;
  if (other != 0) {
    min++;
    max += other;
  }
  cout << min << " " << max << endl;
}
