#include <bits/stdc++.h>
using namespace std;
template <class T>
void chmin(T& a, const T& b) {
  a = min(a, b);
}
template <class T>
void chmax(T& a, const T& b) {
  a = max(a, b);
}
const double EPS = 1e-9;
const long INF = 999999999;
const long MOD = 1000000007;
int dy[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dx[] = {1, -1, 0, 0, 1, -1, -1, 1};
int main() {
  int N, color, counter = 0;
  set<string> st;
  cin >> N;
  for (int i = 0; i < (N); i++) {
    cin >> color;
    if (color <= 399)
      st.insert("gray");
    else if (color <= 799)
      st.insert("Brown");
    else if (color <= 1199)
      st.insert("Green");
    else if (color <= 1599)
      st.insert("Light Blue");
    else if (color <= 1999)
      st.insert("Blue");
    else if (color <= 2399)
      st.insert("Yellow");
    else if (color <= 2799)
      st.insert("Orange");
    else if (color <= 3199)
      st.insert("Red");
    else
      counter++;
  }
  printf("%d %d\n", max(1, (int)st.size()), min(8, (int)st.size() + counter));
  return 0;
}
