#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[101];
  for (int i = 0; i < (n); i++) cin >> a[i];
  map<string, int> mp;
  int gray = 0, brown = 0, green = 0, sky = 0, blue = 0, yellow = 0, orange = 0,
      red = 0, w = 0;
  for (int i = 0; i < (n); i++) {
    if (1 <= a[i] && a[i] <= 399)
      gray = 1;
    else if (400 <= a[i] && a[i] <= 799)
      brown = 1;
    else if (800 <= a[i] && a[i] <= 1199)
      green = 1;
    else if (1200 <= a[i] && a[i] <= 1599)
      sky = 1;
    else if (1600 <= a[i] && a[i] <= 1999)
      blue = 1;
    else if (2000 <= a[i] && a[i] <= 2399)
      yellow = 1;
    else if (2400 <= a[i] && a[i] <= 2799)
      orange = 1;
    else if (2800 <= a[i] && a[i] <= 3199)
      red = 1;
    else
      w += 1;
  }
  int count_0 = 0;
  if (gray == 0) count_0++;
  if (brown == 0) count_0++;
  if (green == 0) count_0++;
  if (sky == 0) count_0++;
  if (blue == 0) count_0++;
  if (yellow == 0) count_0++;
  if (orange == 0) count_0++;
  if (red == 0) count_0++;
  int count_1 = 8 - count_0;
  int ans_min, ans_max;
  int others = gray + brown + green + sky + blue + yellow + orange + red;
  if (w == 0) {
    ans_min = others;
    ans_max = others;
  } else if (w <= 8) {
    if (count_0 >= w) {
      ans_min = others;
      ans_max = others + w;
    } else {
      ans_min = others;
      ans_max = others + w;
    }
  } else {
    ans_min = others;
    ans_max = others + w;
  }
  cout << ans_min << " " << ans_max << endl;
  return 0;
}
