#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T x) {
  std::cout << x << " ";
}
template <typename T>
void println(T x) {
  std::cout << x << "\n";
}
signed main(void) {
  long long n;
  cin >> n;
  vector<long long> a(9, 0);
  for (long long i = 0; i < (n); i++) {
    long long tmp;
    cin >> tmp;
    if (1 <= tmp && tmp <= 399)
      a[0]++;
    else if (400 <= tmp && tmp <= 799)
      a[1]++;
    else if (800 <= tmp && tmp <= 1199)
      a[2]++;
    else if (1200 <= tmp && tmp <= 1599)
      a[3]++;
    else if (1600 <= tmp && tmp <= 1999)
      a[4]++;
    else if (2000 <= tmp && tmp <= 2399)
      a[5]++;
    else if (2400 <= tmp && tmp <= 2799)
      a[6]++;
    else if (2800 <= tmp && tmp <= 3199)
      a[7]++;
    else
      a[8]++;
  }
  long long color = 0;
  long long mincolor = 0;
  for (long long i = 0; i < (8); i++) {
    if (a[i] > 0) color++;
  }
  if (color == 0 && a[8] > 0)
    mincolor = 1;
  else
    mincolor = color;
  print(mincolor);
  print(min((long long)8, color + a[8]));
}
