#include <bits/stdc++.h>
using namespace std;
int main() {
  int c = 399;
  int n;
  cin >> n;
  int *a = new int[n];
  int *ans = new int[9];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    int j = 0;
    int tmp = c;
    while (j < 8) {
      if (a[i] <= tmp) {
        ans[j]++;
        break;
      }
      j++;
      tmp += 1 + c;
    }
    if (j == 8) a[8]++;
  }
  int ans_1 = ans[8], ans_2 = 0;
  for (int i = 0; i < 8; i++) {
    if (ans[i] > 0) {
      ans_1++;
      ans_2++;
    }
  }
  if (ans_2 == 0 && ans[8] > 0) ans_2 = 1;
  cout << ans_1 << " " << ans_2 << endl;
  return 0;
}
