#include <bits/stdc++.h>
using namespace std;
void _cin() {}
template <class Head, class... Tail>
void _cin(Head&& head, Tail&&... tail) {
  cin >> head;
  _cin(forward<Tail>(tail)...);
}
void Main();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  Main();
  return 0;
}
void Main() {
  int n;
  _cin(n);
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  set<string> st;
  int cnt = 0;
  for (int i = 0; i < (n); ++i) {
    if (1 <= a[i] && a[i] <= 399)
      st.insert("gray");
    else if (a[i] <= 799)
      st.insert("brown");
    else if (a[i] <= 1199)
      st.insert("green");
    else if (a[i] <= 1599)
      st.insert("light blue");
    else if (a[i] <= 1999)
      st.insert("blue");
    else if (a[i] <= 2399)
      st.insert("yellow");
    else if (a[i] <= 2799)
      st.insert("orange");
    else if (a[i] <= 3199)
      st.insert("red");
    else
      cnt++;
  }
  int mn = (int)(st).size();
  int mx = min(8, mn + cnt);
  cout << mn << " " << mx << endl;
}
