#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  vector<bool> a(8);
  int count = 0;
  for (int i = 0; i < n; i++) {
    int b;
    cin >> b;
    if (b <= 399) {
      a[0] = 1;
    } else if (b <= 799) {
      a[1] = 1;
    } else if (b <= 1199) {
      a[2] = 1;
    } else if (b <= 1599) {
      a[3] = 1;
    } else if (b <= 1999) {
      a[4] = 1;
    } else if (b <= 2399) {
      a[5] = 1;
    } else if (b <= 2799) {
      a[6] = 1;
    } else if (b <= 3199) {
      a[7] = 1;
    } else {
      count++;
    }
  }
  int c = a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7];
  cout << c << " ";
  cout << min(c + count, 8) << endl;
  return 0;
}
