#include <bits/stdc++.h>
using namespace std;
template <class T>
bool umin(T &a, const T &b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool umax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
template <class A>
void read(vector<A> &v);
template <class A, size_t S>
void read(array<A, S> &a);
template <class T>
void read(T &x) {
  cin >> x;
}
void read(double &d) {
  string t;
  read(t);
  d = stod(t);
}
void read(long double &d) {
  string t;
  read(t);
  d = stold(t);
}
template <class H, class... T>
void read(H &h, T &...t) {
  read(h);
  read(t...);
}
template <class A>
void read(vector<A> &x) {
  for (auto &a : x) read(a);
}
template <class A, size_t S>
void read(array<A, S> &x) {
  for (auto &a : x) read(a);
}
string to_string(char c) { return string(1, c); }
string to_string(bool b) { return b ? "true" : "false"; }
string to_string(const char *s) { return string(s); }
string to_string(string s) { return s; }
string to_string(vector<bool> v) {
  string res;
  for (long long i = (0);
       (1) > 0 ? i < ((long long)(v).size()) : i > ((long long)(v).size());
       i += (1))
    res += char('0' + v[i]);
  return res;
}
template <size_t S>
string to_string(bitset<S> b) {
  string res;
  for (long long i = (0); (1) > 0 ? i < (S) : i > (S); i += (1))
    res += char('0' + b[i]);
  return res;
}
template <class T>
string to_string(T v) {
  bool f = 1;
  string res;
  for (auto &x : v) {
    if (!f) res += ' ';
    f = 0;
    res += to_string(x);
  }
  return res;
}
template <class A>
void write(A x) {
  cout << to_string(x);
}
template <class H, class... T>
void write(const H &h, const T &...t) {
  write(h);
  write(t...);
}
void print() { write("\n"); }
template <class H, class... T>
void print(const H &h, const T &...t) {
  write(h);
  if (sizeof...(t)) write(' ');
  print(t...);
}
template <class T, class U>
void vti(vector<T> &v, U x, size_t n) {
  v = vector<T>(n, x);
}
template <class T, class U>
void vti(vector<T> &v, U x, size_t n, size_t m...) {
  v = vector<T>(n);
  for (auto &a : v) vti(a, x, m);
}
void solve() {
  long long n;
  read(n);
  vector<long long> a(n);
  read(a);
  vector<long long> b(8);
  long long t = 0;
  for (long long i = (0); (1) > 0 ? i < (n) : i > (n); i += (1)) {
    if (a[i] < 400) {
      b[0]++;
    } else if (a[i] < 800) {
      b[1]++;
    } else if (a[1] < 1200) {
      b[2]++;
    } else if (a[i] < 1600) {
      b[3]++;
    } else if (a[i] < 2000) {
      b[4]++;
    } else if (a[i] < 2400) {
      b[5]++;
    } else if (a[i] < 2800) {
      b[6]++;
    } else if (a[i] < 3200) {
      b[7]++;
    } else {
      t++;
    }
  }
  long long ans = 0;
  for (auto &x : b) {
    if (x > 0) {
      ans++;
    }
  }
  print(ans, ans + min(t, 8 - ans));
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long tt = 1;
  for (long long i = (0); (1) > 0 ? i < (tt) : i > (tt); i += (1)) {
    solve();
  }
}
