#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = decltype(1ull);
template <class T>
int size(T&& a) {
  return a.size();
}
template <class B>
pair<int, B> make_pair(B b) {
  return {0, b};
}
void Calc();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin.exceptions(istream::failbit | istream::badbit);
  cout << fixed << setprecision(15);
  Calc();
  cout.flush();
  return 0;
}
template <class A>
void amax(A& a, A b) {
  a = max(a, b);
}
template <class A>
void amin(A& a, A b) {
  a = min(a, b);
}
template <class A>
int comp(A a, A b) {
  return a < b ? 1 : b < a ? -1 : 0;
}
struct Scanner {
  template <class A = string>
  A Next() {
    A a;
    cin >> a;
    return a;
  }
  template <class A = int>
  vector<A> Array(int n) {
    vector<A> a(n);
    for (A& i : a) cin >> i;
    return a;
  }
  string Line() const {
    string s;
    getline(cin, s);
    return s;
  }
  template <class A>
  Scanner& operator,(A& a) {
    a = Next<A>();
    return *this;
  }
  template <class A>
  operator A() {
    return Next<A>();
  }
} in;
void Calc() {
  int n = in;
  auto a = in.Array(n);
  map<int, int> m;
  for (auto& i : a) {
    if (i <= 399) {
      m[0]++;
    } else if (i <= 799) {
      m[1]++;
    } else if (i <= 1199) {
      m[2]++;
    } else if (i <= 1599) {
      m[3]++;
    } else if (i <= 1999) {
      m[4]++;
    } else if (i <= 2399) {
      m[5]++;
    } else if (i <= 2799) {
      m[6]++;
    } else if (i <= 3199) {
      m[7]++;
    } else
      m[8]++;
  }
  (void)0;
  auto mini = m.size();
  if (m[8]) mini--;
  int maxi = mini;
  maxi = min(maxi + m[8], 8);
  cout << (mini) << ' ' << maxi << endl;
}
