#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  std::cin >> n;
  vector<int> a(n);
  vector<int> color(8, 0);
  int sum = 0;
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
    color[0] += (1 <= a[i] and a[i] <= 399);
    color[1] += (400 <= a[i] and a[i] <= 799);
    color[2] += (800 <= a[i] and a[i] <= 1199);
    color[3] += (1200 <= a[i] and a[i] <= 1599);
    color[4] += (1600 <= a[i] and a[i] <= 1999);
    color[5] += (2000 <= a[i] and a[i] <= 2399);
    color[6] += (2400 <= a[i] and a[i] <= 2799);
    color[7] += (2800 <= a[i] and a[i] <= 3199);
    sum += (3200 <= a[i]);
  }
  int ans = 0;
  for (int i = 0; i < 8; i++) {
    ans += (color[i] > 0);
  }
  std::cout << max(1, ans) << " " << min(ans + sum, 8);
  return 0;
}
