#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1001002003004005006ll;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 0, subans = 0;
  sort(a, a + n);
  bool grey = false, brown = false, green = false, water = false, blue = false,
       yellow = false, orange = false, red = false;
  for (int i = 0; i < n; i++) {
    if (a[i] >= 3200) {
      ans++;
    }
    if (!grey && (a[i] > 0 && a[i] < 400)) {
      ans++;
      grey = true;
      subans++;
    }
    if (!brown && (a[i] >= 400 && a[i] < 800)) {
      ans++;
      brown = true;
      subans++;
    }
    if (!green && (a[i] >= 800 && a[i] < 1200)) {
      ans++;
      green = true;
      subans++;
    }
    if (!water && (a[i] >= 1200 && a[i] < 1600)) {
      ans++;
      water = true;
      subans++;
    }
    if (!blue && (a[i] >= 1600 && a[i] < 2000)) {
      ans++;
      blue = true;
      subans++;
    }
    if (!yellow && (a[i] >= 2000 && a[i] < 2400)) {
      ans++;
      yellow = true;
      subans++;
    }
    if (!orange && (a[i] >= 2400 && a[i] < 2800)) {
      ans++;
      orange = true;
      subans++;
    }
    if (!red && (a[i] >= 2800 && a[i] < 3200)) {
      ans++;
      red = true;
      subans++;
    }
  }
  cout << subans << ' ' << min(ans, 8) << endl;
  return 0;
}
