#include <bits/stdc++.h>
using namespace std;
int color[8];
int dobby;
int nothing;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    if (x < 400) color[0] = 1;
    if (x > 399 && x < 800) color[1] = 1;
    if (x > 799 && x < 1200) color[2] = 1;
    if (x > 1199 && x < 1600) color[3] = 1;
    if (x > 1599 && x < 2000) color[4] = 1;
    if (x > 1999 && x < 2400) color[5] = 1;
    if (x > 2399 && x < 2800) color[6] = 1;
    if (x > 2799 && x < 3200) color[7] = 1;
    if (x > 3199) ++dobby;
  }
  int collect = 0;
  for (int j = 0; j < 8; ++j)
    if (color[j])
      ++collect;
    else
      ++nothing;
  int nocolor = 0;
  if (dobby > nothing) nocolor = 1;
  cout << collect << " " << collect + min(dobby, nothing) + nocolor;
}
