#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  map<int, int> m;
  int sub = 0;
  for (int i = 0; i < N; i++) {
    if (1 <= a[i] && a[i] <= 399) m[0]++;
    if (400 <= a[i] && a[i] <= 799) m[1]++;
    if (800 <= a[i] && a[i] <= 1199) m[2]++;
    if (1200 <= a[i] && a[i] <= 1599) m[3]++;
    if (1600 <= a[i] && a[i] <= 1999) m[4]++;
    if (2000 <= a[i] && a[i] <= 2399) m[5]++;
    if (2400 <= a[i] && a[i] <= 2799) m[6]++;
    if (2800 <= a[i] && a[i] <= 3199) m[7]++;
    if (3200 <= a[i]) sub++;
  }
  int mi = m.size();
  int ma = m.size();
  if (sub > 0 && ma < 8) {
    ma = min(8, ma + sub);
  } else if (sub > 0 && ma == 0) {
    mi = 1;
    ma = min(8, sub);
  }
  cout << mi << " " << ma << endl;
}
