#include <bits/stdc++.h>
using namespace std;
int main() {
  int gray = 0;
  int brawn = 0;
  int green = 0;
  int water = 0;
  int blue = 0;
  int yellow = 0;
  int orange = 0;
  int red = 0;
  int random = 0;
  int cnt = 0;
  int N, i;
  int a[110];
  cin >> N;
  for (i = 1; i <= N; i++) {
    cin >> a[i];
    if (a[i] <= 399) gray++;
    if (a[i] >= 400 && a[i] <= 799) brawn++;
    if (a[i] >= 800 && a[i] <= 1199) green++;
    if (a[i] >= 1200 && a[i] <= 1599) water++;
    if (a[i] >= 1600 && a[i] <= 1999) blue++;
    if (a[i] >= 2000 && a[i] <= 2399) yellow++;
    if (a[i] >= 2400 && a[i] <= 2799) orange++;
    if (a[i] >= 2800 && a[i] <= 3199) red++;
    if (a[i] >= 3200) random++;
  }
  if (gray != 0) cnt++;
  if (brawn != 0) cnt++;
  if (green != 0) cnt++;
  if (water != 0) cnt++;
  if (blue != 0) cnt++;
  if (yellow != 0) cnt++;
  if (orange != 0) cnt++;
  if (red != 0) cnt++;
  if (random == 0) {
    cout << cnt << " " << cnt << endl;
  } else if (cnt + random > 8) {
    cout << cnt << " " << 8 << endl;
  } else if (cnt > 0) {
    cout << cnt << " " << cnt + random << endl;
  } else {
    cout << 1 << " " << random << endl;
  }
}
