#include <bits/stdc++.h>
using namespace std;
int n, s[4803], x, ans, sum;
int main() {
  scanf("%d", &n);
  for (int a = 1; a <= n; a++) {
    scanf("%d", &x);
    s[x]++;
  }
  for (int a = 0; a <= 7; a++)
    for (int b = 0; b <= 399; b++) {
      if (s[a * 400 + b] != 0) {
        ans++;
        break;
      }
    }
  for (int a = 3200; a <= 4800; a++) {
    sum += s[a];
  }
  printf("%d ", max(1, ans));
  ans = min(8, ans + sum);
  printf("%d\n", ans);
}
