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