#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, Min = 0;
  int a[10];
  int tmp;
  for (int i = 1; i < 10; i++) a[i] = 0;
  Min = 0;
  cin >> n;
  for (cin >> n; n--;) {
    cin >> tmp;
    if (tmp < 400)
      a[1] = 1;
    else if (tmp < 800)
      a[2] = 1;
    else if (tmp < 1200)
      a[3] = 1;
    else if (tmp < 1600)
      a[4] = 1;
    else if (tmp < 2000)
      a[5] = 1;
    else if (tmp < 2400)
      a[6] = 1;
    else if (tmp < 2800)
      a[7] = 1;
    else if (tmp < 3200)
      a[8] = 1;
    else
      a[9]++;
  }
  for (int i = 1; i < 9; i++) {
    if (a[i] == 1) Min++;
  }
  cout << max(1, Min) << " " << Min + a[9] << endl;
  return 0;
}
