#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n, 0);
  vector<int> color(8, 0);
  int super_red = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (1 <= a[i] && a[i] <= 399) color[0]++;
    if (400 <= a[i] && a[i] <= 799) color[1]++;
    if (800 <= a[i] && a[i] <= 1199) color[2]++;
    if (1200 <= a[i] && a[i] <= 1599) color[3]++;
    if (1600 <= a[i] && a[i] <= 1999) color[4]++;
    if (2000 <= a[i] && a[i] <= 2399) color[5]++;
    if (2400 <= a[i] && a[i] <= 2799) color[6]++;
    if (2800 <= a[i] && a[i] <= 3199) color[7]++;
    if (3200 <= a[i]) super_red++;
  }
  int cnt = 0;
  for (int i = 0; i <= 7; i++) {
    if (1 <= color[i]) cnt++;
  }
  long long min_cnt, max_cnt;
  min_cnt = max_cnt = 0;
  if (cnt > 0) {
    min_cnt = cnt;
    max_cnt = cnt + super_red;
  } else if (cnt == 0) {
    if (super_red >= 3) {
      min_cnt = 1;
      max_cnt = super_red - 1;
    } else if (super_red == 2) {
      min_cnt = 1;
      max_cnt = 2;
    } else if (super_red == 1) {
      min_cnt = max_cnt = 1;
    } else if (super_red == 0) {
      min_cnt = max_cnt = 0;
    }
  }
  cout << min_cnt << " " << max_cnt << endl;
  return 0;
}
