#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int arr[8] = {};
  int cnt = 0;
  for (auto i = 0; i < (long long)(n); i++) {
    int x;
    cin >> x;
    if (x >= 3200) cnt++;
    if (x <= 399)
      arr[0]++;
    else if (x <= 799)
      arr[1]++;
    else if (x <= 1199)
      arr[2]++;
    else if (x <= 1599)
      arr[3]++;
    else if (x <= 1999)
      arr[4]++;
    else if (x <= 2399)
      arr[5]++;
    else if (x <= 2799)
      arr[6]++;
    else if (x <= 3199)
      arr[7]++;
  }
  int hoba = 0;
  for (auto i = 0; i < (long long)(8); i++) hoba += (arr[i] ? 1 : 0);
  cout << hoba << " " << hoba + cnt;
  return 0;
}
