#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
using PAIR = pair<int, int>;
constexpr int INF = 1 << 30;
constexpr int64 LINF = 1LL << 60;
constexpr int MOD = 1e9 + 7;
constexpr int MAX_N = 1e5 + 1;
template <typename T>
void MACRO_VAR_Scan(T &t) {
  cin >> t;
}
template <typename First, typename... Rest>
void MACRO_VAR_Scan(First &first, Rest &...rest) {
  cin >> first;
  MACRO_VAR_Scan(rest...);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  int64 n;
  MACRO_VAR_Scan(n);
  ;
  vector<int64> a(n);
  for (auto &&i : a) cin >> i;
  ;
  map<int64, int64> mp;
  for (int64 i = 0; i < (n); ++i) {
    mp[min(a[i] / 400, 8LL)]++;
  }
  int64 mn = 0, mx = 0;
  for (auto &&mi : (mp)) {
    if (mi.first < 8) {
      mn++;
      mx++;
    } else {
      mx = min(mx + mi.second, 8LL);
    }
  }
  cout << (mn);
  cout << " ";
  ;
  cout << (mx);
  cout << "\n";
  ;
  return 0;
}
