#include <bits/stdc++.h>
using namespace std;
static const int INF = INT_MAX;
static const long long LINF = LLONG_MAX;
static const int MIN = INT_MIN;
static const long long LMIN = LLONG_MIN;
static const int MOD = 1000000007;
int dx[] = {0, -1, 1, 0};
int dy[] = {-1, 0, 0, 1};
int color[10];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int more = 0;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    if (1 <= a && a < 400) ++color[1];
    if (400 <= a && a < 800) ++color[2];
    if (800 <= a && a < 1200) ++color[3];
    if (1200 <= a && a < 1600) ++color[4];
    if (1600 <= a && a < 2000) ++color[5];
    if (2000 <= a && a < 2400) ++color[6];
    if (2400 <= a && a < 2800) ++color[7];
    if (2800 <= a && a < 3200) ++color[8];
    if (3200 <= a) ++more;
  }
  int kind = 0;
  int z_cnt = 0;
  for (int i = 1; i <= 8; ++i) {
    if (color[i])
      ++kind;
    else
      ++z_cnt;
  }
  int mn, mx;
  if (kind == 0)
    mn = 1;
  else
    mn = kind;
  if (z_cnt <= more) {
    more -= z_cnt;
    mx = kind + more;
  } else
    mx = kind + more;
  cout << mn << " " << mx << '\n';
  return 0;
}
