#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, a, gray, brown, green, cyan, blue, yellow, orange, red, any;
  gray = brown = green = cyan = blue = yellow = orange = red = any = 0;
  cin >> n;
  while (n--) {
    cin >> a;
    if (a < 400)
      gray = 1;
    else if (a < 800)
      brown = 1;
    else if (a < 1200)
      green = 1;
    else if (a < 1600)
      cyan = 1;
    else if (a < 2000)
      blue = 1;
    else if (a < 2400)
      yellow = 1;
    else if (a < 2800)
      orange = 1;
    else if (a < 3200)
      red = 1;
    else
      any++;
  }
  int color_count = gray + brown + green + cyan + blue + yellow + orange + red;
  cout << color_count << ' ' << min(8, color_count + any) << '\n';
  return 0;
}
