#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<string> st;
  int over = 0;
  for (long long i = 0; i < (long long)(n); i++) {
    int tmp;
    cin >> tmp;
    switch (tmp) {
      case 1 ... 399:
        st.insert("gray");
        break;
      case 400 ... 799:
        st.insert("brown");
        break;
      case 800 ... 1199:
        st.insert("green");
        break;
      case 1200 ... 1599:
        st.insert("sky");
        break;
      case 1600 ... 1999:
        st.insert("blue");
        break;
      case 2000 ... 2399:
        st.insert("yellow");
        break;
      case 2400 ... 2799:
        st.insert("orange");
        break;
      case 2800 ... 3199:
        st.insert("red");
        break;
      default:
        over++;
    }
  }
  cout << max(1, (int)st.size()) << " " << min(9, (int)st.size() + over)
       << endl;
  return 0;
}
