#include <bits/stdc++.h>
using namespace std;
template <class T>
using vec = vector<T>;
template <class T>
using heap = priority_queue<T>;
template <class T>
using minheap = priority_queue<T, vec<T>, greater<T>>;
using lint = long long;
using ulint = unsigned long long;
using ld = long double;
using vi = vec<int>;
using vvi = vec<vi>;
using vvvi = vec<vvi>;
using pii = pair<int, int>;
using vs = vec<string>;
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
  return os << p.first << " " << p.second;
}
template <class T, class U>
istream &operator>>(istream &is, pair<T, U> &p) {
  return is >> p.first >> p.second;
}
const int INF{1001001001};
const lint LINF{1001001001001001001ll};
const int MOD{(int)1e9 + 7};
const double EPS{1e-9};
const double PI{acos(-1)};
const int dx[]{0, 1, 0, -1, 1, -1, 1, -1}, dy[]{1, 0, -1, 0, 1, -1, -1, 1};
inline bool inside(int y, int x, int h, int w) {
  return y >= 0 && x >= 0 && y < h && x < w;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (a > b) a = b;
  return a > b;
}
template <class T>
inline bool chmax(T &a, const T &b) {
  if (a < b) a = b;
  return a < b;
}
template <class T>
inline void print(const T &x) {
  cout << x << '\n';
}
template <class T>
inline void print(const vec<T> &v, string d = "\n") {
  for (lint i = (0); i < (lint)(v.size()); i += (1))
    cout << v[i] << (i == (lint)v.size() - 1 ? "\n" : d);
}
template <class T = int>
inline T in() {
  T x;
  cin >> x;
  return x;
}
template <class T = string>
vec<T> split(const string &s, char d = ',') {
  vec<T> v;
  stringstream ss(s);
  for (string b; getline(ss, b, d);) {
    stringstream conv(b);
    T t;
    conv >> t;
    v.emplace_back(t);
  }
  return v;
}
struct pre_ {
  pre_() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(12);
  }
} pre__;
signed main() {
  int n = in();
  vi v(n);
  for (lint i = (0); i < (lint)(n); i += (1)) v[i] = in();
  bool f[8] = {};
  int cnt = 0;
  for (auto &&p : (v)) {
    if (p < 400) {
      f[0] = true;
    } else if (p < 800) {
      f[1] = true;
    } else if (p < 1200) {
      f[2] = true;
    } else if (p < 1600) {
      f[3] = true;
    } else if (p < 2000) {
      f[4] = true;
    } else if (p < 2400) {
      f[5] = true;
    } else if (p < 2800) {
      f[6] = true;
    } else if (p < 3200) {
      f[7] = true;
    } else {
      cnt++;
    }
  }
  int t = count(begin(f), end(f), true);
  cout << t << " " << t + cnt << endl;
}
